[Issue 4737] New: enum breaks linker when passed to typeid()

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Aug 26 14:34:48 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4737

           Summary: enum breaks linker when passed to typeid()
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          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> 2010-08-26 14:34:39 PDT ---
module test;

import std.stdio;

unittest
{
    enum X { A = 3, B, C }
    X x; 

    write(typeid(x));
    write(typeid(X));   
}

void main()
{
}

 Error 42: Symbol Undefined _D4test11__unittest1FZv1X6__initZ

Sometimes it will compile, but then the app crashes and I get an access
violation message in console.

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


More information about the Digitalmars-d-bugs mailing list