[Issue 8307] inconsistent treatment of auto functions
https://d.puremagic.com/issues/show_bug.cgi?id=8307 yebblies changed: What|Removed |Added Keywords||spec CC||yebbl...@gmail.com Component|DMD |websites --- Comment #1 from yebblies 2013-11-27 03:05:17 EST --- Spec bug, setting component. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8307] inconsistent treatment of auto functions
https://issues.dlang.org/show_bug.cgi?id=8307 Andrej Mitrovic changed: What|Removed |Added Status|NEW |RESOLVED CC||andrej.mitrov...@gmail.com Resolution|--- |WORKSFORME --- Comment #2 from Andrej Mitrovic --- > auto foo(){ return 0; return 0.0; } // ok Warning: statement is not reachable > auto bar(int x){ if(x==0) return 0; return bar(x-1)+1; } // error Error: forward reference to bar The spec seems correct afaict, unless I'm missing something. --
[Issue 8307] inconsistent treatment of auto functions
https://issues.dlang.org/show_bug.cgi?id=8307 timon.g...@gmx.ch changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|WORKSFORME |--- --- Comment #3 from timon.g...@gmx.ch --- (In reply to Andrej Mitrovic from comment #2) > > The spec seems correct afaict, ??? > unless I'm missing something. In 'foo' the types of the two return expressions do not 'match exactly', yet it is accepted. In 'bar' according to the spec the return type is settled after the first return statement, hence there would _not_ be a circular dependency. --
[Issue 8307] inconsistent treatment of auto functions
https://issues.dlang.org/show_bug.cgi?id=8307 --- Comment #4 from Andrej Mitrovic --- (In reply to timon.gehr from comment #3) > In 'foo' the types of the two return expressions do not 'match exactly', yet > it is accepted. There's an error with -w though, so it's caught one way or the other. Although maybe we're just lucky here. > In 'bar' according to the spec the return type is settled > after the first return statement, hence there would _not_ be a circular > dependency. Ah, ok then. --
[Issue 8307] inconsistent treatment of auto functions
https://issues.dlang.org/show_bug.cgi?id=8307 Kenji Hara changed: What|Removed |Added Keywords||pull --- Comment #5 from Kenji Hara --- Language specification fix: https://github.com/D-Programming-Language/dlang.org/pull/651 --
[Issue 8307] inconsistent treatment of auto functions
https://issues.dlang.org/show_bug.cgi?id=8307 --- Comment #6 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dlang.org https://github.com/D-Programming-Language/dlang.org/commit/15259b7319c1a7c7782888bec28c8d5acdeb317f fix Issue 8307 - inconsistent treatment of auto functions https://github.com/D-Programming-Language/dlang.org/commit/88d0c0f258f7d78c7729137da83c57cc27d95607 Merge pull request #651 from 9rnsr/fix13336 Issue 8307 and 13336 - fix documentation around return type inference and ref deduction --
[Issue 8307] inconsistent treatment of auto functions
https://issues.dlang.org/show_bug.cgi?id=8307 github-bugzi...@puremagic.com changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|--- |FIXED --
[Issue 8307] inconsistent treatment of auto functions
https://issues.dlang.org/show_bug.cgi?id=8307 --- Comment #7 from github-bugzi...@puremagic.com --- Commits pushed to 2.067 at https://github.com/D-Programming-Language/dlang.org https://github.com/D-Programming-Language/dlang.org/commit/15259b7319c1a7c7782888bec28c8d5acdeb317f fix Issue 8307 - inconsistent treatment of auto functions https://github.com/D-Programming-Language/dlang.org/commit/88d0c0f258f7d78c7729137da83c57cc27d95607 Merge pull request #651 from 9rnsr/fix13336 --