D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7747 - Diagnostic should be informative for an inferred return type in a recursive call
Summary: Diagnostic should be informative for an inferred return type in a recursive call
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 enhancement
Assignee: Andrej Mitrovic
URL:
Keywords: diagnostic, pull
Depends on:
Blocks:
 
Reported: 2012-03-21 11:36 UTC by dlang+issues
Modified: 2014-04-30 07:37 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description dlang+issues 2012-03-21 11:36:33 UTC
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 Andrej Mitrovic 2014-04-28 12:31:12 UTC
https://github.com/D-Programming-Language/dmd/pull/3509
Comment 2 github-bugzilla 2014-04-30 07:37:28 UTC
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.