www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9341] New: Linker error with array literal populated by compile-time tuple

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9341

           Summary: Linker error with array literal populated by
                    compile-time tuple
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: hsteoh quickfur.ath.cx


--- Comment #0 from hsteoh quickfur.ath.cx 2013-01-17 15:49:47 PST ---
Code:

import std.traits;

void main() {
        enum E { First = 1, Second = 2, Third = 3 };
        auto members = [ EnumMembers!E ];
}

Compiler output:

test.o:(.data._D16TypeInfo_Emain1E6__initZ+0x30): undefined reference to
`_Dmain1E6__initZ'
collect2: error: ld returned 1 exit status
--- errorlevel 1


Changing 'auto' to 'static' makes the linker error go away, for some odd
reason.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 17 2013
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9341


Andrej Mitrovic <andrej.mitrovich gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |andrej.mitrovich gmail.com
         Resolution|                            |DUPLICATE


--- Comment #1 from Andrej Mitrovic <andrej.mitrovich gmail.com> 2013-01-17
16:18:07 PST ---
*** This issue has been marked as a duplicate of issue 6057 ***

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