digitalmars.D.bugs - [Issue 12682] New: Bad error messages with global assignment of
- via Digitalmars-d-bugs (27/27) Apr 30 2014 https://issues.dlang.org/show_bug.cgi?id=12682
https://issues.dlang.org/show_bug.cgi?id=12682 Issue ID: 12682 Summary: Bad error messages with global assignment of mutable lambda value Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Keywords: diagnostic Severity: normal Priority: P1 Component: DMD Assignee: nobody puremagic.com Reporter: bearophile_hugs eml.cc int function(int) f2; auto f1 = (int x) => x; // OK f2 = (int x) => x; // Errors void main() { f2 = (int x) => x; // OK } DMD 2.066alpha gives: test.d(3,9): Error: no identifier for declarator f2 test.d(3,9): Error: Declaration expected, not '=' Here I'd like D to give a single better error message, that explains the true problem. --
Apr 30 2014