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: [email protected]
          Reporter: [email protected]

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.

--

Reply via email to