[Issue 16278] New: [REG2.067] undefined reference when class template is instantiated only in 'is' expression

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Jul 13 14:51:10 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=16278

          Issue ID: 16278
           Summary: [REG2.067] undefined reference when class template is
                    instantiated only in 'is' expression
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: ag0aep6g at gmail.com

test.d:
----
class A()
{
    static struct S { A a; }
}
enum e = is(A!());
void main() {}
----

`dmd test.d`:
----
test.o:(.data._D25TypeInfo_xC4test6__T1AZ1A6__initZ+0x10): undefined reference
to `_D4test6__T1AZ1A7__ClassZ'
collect2: error: ld returned 1 exit status
Error: linker exited with status 1
----

Works with 2.066. Fails since 2.067. Works with the newer versions when
-allinst is given.

--


More information about the Digitalmars-d-bugs mailing list