Summary: Wrong error line number with enum
           Product: D
           Version: future
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: diagnostic
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from 2010-04-09 19:57:53 PDT ---
This is wrong D2 code:

void main() {
    enum double n = 10;
    // *****
    // *****
    // *****
    auto arr = new int[n];

dmd 2.043 prints:

test.d(2): Error: cannot implicitly convert expression (10) of type double to

Note the line number of the error. It says 2 and not 6.
If the enum is far away from the line where arr is defined, it's not easy to
understand, find, and fix the bug in the code.

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

Reply via email to