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

           Summary: class in lambda causes linker trouble
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: ellery-newco...@utulsa.edu


--- Comment #0 from Ellery Newcomer <ellery-newco...@utulsa.edu> 2012-07-16 
00:00:56 PDT ---
dmd 2.059.

code:

template isAllocator(A)
{
    enum bool isAllocator = is(typeof({
        A a;

        static class C {}
        C c = a.create!C; // <- comment out and no undefined references
    }));
}
struct GCAllocator
{
    C create(C, )()     {
        return new C;
    }
}

pragma(msg,isAllocator!GCAllocator);

void main(){}



fireworks:

all.o: In function
`_D3all11GCAllocator68__T6createTC3all36__T11isAllocatorTS3all11GCAllocatorZ9__lambda1M1CZ6createMFZC3all36__T11isAllocatorTS3all11GCAllocatorZ9__lambda1M1C':
all.d:(.text._D3all11GCAllocator68__T6createTC3all36__T11isAllocatorTS3all11GCAllocatorZ9__lambda1M1CZ6createMFZC3all36__T11isAllocatorTS3all11GCAllocatorZ9__lambda1M1C+0x37):
undefined reference to
`_D3all36__T11isAllocatorTS3all11GCAllocatorZ9__lambda1MFNaNbNfZv1C7__ClassZ'
collect2: ld returned 1 exit status
--- errorlevel 1

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

Reply via email to