[Issue 12337] New: Bad enum usage wrong error message line number

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Mar 10 10:59:50 PDT 2014


https://d.puremagic.com/issues/show_bug.cgi?id=12337

           Summary: Bad enum usage wrong error message line number
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: diagnostic
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2014-03-10 10:59:47 PDT ---
This is wrong code:


enum Foo : ubyte { A, B }
void main() {
    Foo x = Foo.A | Foo.B;
}



dmd 2.066alpha gives an error message on the wrong line:

test.d(1,20): Error: cannot implicitly convert expression (1) of type int to
Foo

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list