[Issue 12682] New: Bad error messages with global assignment of mutable lambda value
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Apr 30 02:16:46 PDT 2014
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 at puremagic.com
Reporter: bearophile_hugs at 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.
--
More information about the Digitalmars-d-bugs
mailing list