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?
https://github.com/D-Programming-Language/dmd/pull/3509
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.