Summary: Better error message for wrong switch type
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: diagnostic
          Severity: minor
          Priority: P2
         Component: DMD

--- Comment #0 from 2010-07-31 04:29:59 PDT ---
This is a wrong D2 program:

void main() {
    float x;
    switch (x) {

dmd 2.047 prints:
test.d(3): Error: 'x' is not of integral type, it is a float

But in D strings too are allowed in switch, so a better error message can be:
test.d(3): Error: 'x' is not of integral type or string, it is a float

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

Reply via email to