Bug 9341 – Linker error with array literal populated by compile-time tuple

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-01-17T15:49:00Z
Last change time
2013-01-17T16:18:07Z
Assigned to
nobody
Creator
hsteoh

Comments

Comment #0 by hsteoh — 2013-01-17T15:49:47Z
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.
Comment #1 by andrej.mitrovich — 2013-01-17T16:18:07Z
*** This issue has been marked as a duplicate of issue 6057 ***