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

           Summary: Locally-instantiated structs are not instantiated
                    locally
           Product: D
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzi...@digitalmars.com
        ReportedBy: and...@metalanguage.com


struct A(alias F)
{
    int fun(int i) { return F(i); }
}

A!(F) makeA(alias F)() {return A!(F)(); }

void main()
{
    int x = 40;
    int fun(int i) { return x + i; }
    A!(fun) a = makeA!(fun)();
    a.fun(2);
}

function test.main.A!(fun).A.fun cannot get frame pointer to main

The struct should be instantiated locally and save the frame pointer to the
caller.


-- 

Reply via email to