[Issue 12380] New: Wrong line number for type mismatch with enum .init assignment

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Mar 16 01:56:34 PDT 2014


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

           Summary: Wrong line number for type mismatch with enum .init
                    assignment
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: diagnostic
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: andrej.mitrovich at gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2014-03-16 01:56:20 PDT ---
-----
enum E { a, b, }  // L1

void main()
{
    void* a = E.init;  // L5
}
-----

$ dmd test.d
test.d(1): Error: cannot implicitly convert expression (cast(E)0) of type E to
void*

Should be:
test.d(5): Error: cannot implicitly convert expression (cast(E)0) of type E to
void*

-- 
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