Summary: functions in templates inferred as delegate
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from simendsjo <> 2012-02-25 09:22:34 PST ---
extern(C) alias void function() Callback;

template Wrap(alias dg)
    extern(C) void Wrap()

void main()
    Callback cb = &Wrap!( () {} );

Error: cannot implicitly convert expression (&Wrap) of type void delegate()
pure nothrow @safe to extern (C) void function()

According to Timon Gehr: "'() {}' should be inferred as void function()pure
nothrow @safe."$1jl5$

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to