Summary: Improve error message on access to non-existent enum
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD

--- Comment #0 from Andrej Mitrovic <> 2012-01-22 
19:29:38 PST ---
enum X

void main()
    auto x = X.Yes;

test.d(11): Error: no property 'Yes' for type 'int'

There are two things that could be improved. One is to change the error message

test.d(11): Error: no property 'Yes' for type 'X'

This is the error you get when accessing fields that don't exist in a struct.
We could also make this say "enum" instead of "type.

The second enhancement would be to implement the 'spelling correction' which we
already have in some places. So the error message (in this case) would be:

test.d(14): Error: no property 'Yes' for type 'X', did you mean property 'yes'?

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

Reply via email to