Bug 9479 – _error_ in error message of type inference of a delegate literal

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-02-08T02:41:00Z
Last change time
2013-02-09T07:31:13Z
Keywords
diagnostic, pull
Assigned to
andrej.mitrovich
Creator
clugdbug

Comments

Comment #0 by clugdbug — 2013-02-08T02:41:29Z
int delegate() bug9479() { return { return something_undefined; }; } bug.d(4): Error: undefined identifier something_undefined bug.d(4): Error: mismatched function return type inference of _error_ and int The second error message should be suppressed.
Comment #1 by andrej.mitrovich — 2013-02-08T11:17:00Z
Comment #2 by github-bugzilla — 2013-02-09T07:23:15Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/0d5a3ba6fe1665ab5739f1afe202e9b9c3ee4d79 Fixes Issue 9479 - Suppress mismatch of return type when return expression is an error. https://github.com/D-Programming-Language/dmd/commit/bd11999d75cf5c945c13da50a340863620f3f01b Merge pull request #1648 from AndrejMitrovic/Fix9479 Issue 9479 - Suppress mismatch of return type diagnostic when return expression is an error