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



--- Comment #1 from Kenji Hara <k.hara...@gmail.com> 2012-02-25 20:21:04 PST ---
The root cause is conservative escape analysis for nested template
instantiation.

extern(C) alias void function() Callback;

template Wrap(alias dg)
{
    extern(C) void Wrap() { dg(); }
}

void f1(){}

void main()
{
    static void f2(){}
    void f3(){}

    Callback cb1 = &Wrap!(f1);      // OK
    Callback cb2 = &Wrap!(f2);      // OK
    Callback cb3 = &Wrap!(f3);      // NG
    Callback cb3 = &Wrap!((){});    // NG
}

Current implementation always treats lambda literal as nested symbol.

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

Reply via email to