Bug 7747 – Diagnostic should be informative for an inferred return type in a recursive call
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-03-21T11:36:00Z
Last change time
2014-04-30T07:37:29Z
Keywords
diagnostic, pull
Assigned to
andrej.mitrovich
Creator
wfunction
Comments
Comment #0 by wfunction — 2012-03-21T11:36:33Z
auto fact(int n) { return n > 1 ? fact(n - 1) : 0; }
// Error: forward reference to fact
I think the error message could be improved... maybe something like
"forward reference to inferred return type" like we get with templates?
Comment #1 by andrej.mitrovich — 2014-04-28T12:31:12Z