Summary: Generic error message for wrong foreach
           Product: D
           Version: 2.040
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from 2010-02-18 10:18:34 PST ---
void main() {
    auto a = [10];
    foreach(i, x, a) {}

This common programming mistake produces this error message:

test.d(3): no identifier for declarator a

But it's better if dmd here prints a better error message, specific for
foreach(), to help programmers.

(I think this typing mistake is sometimes caused because inside a foreach a
comma sometimes looks quite similar to a semicolon.)

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to