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
Comment #2 by github-bugzilla — 2014-04-30T07:37:28Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/09d5c9574919be2249b45b3ade2942377121c086 Fix Issue 7747 - Diagnostic should be informative for an inferred return type in a recursive call. https://github.com/D-Programming-Language/dmd/commit/e389d1cf778131a08058f0b2e780ab2ac81358b3 Merge pull request #3509 from AndrejMitrovic/Fix7747 Issue 7747 - Diagnostic should be informative for an inferred return type.