Summary: Delegate type inference with templates is absolutely
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD

--- Comment #0 from 2012-05-21 23:37:25 PDT ---
The code:

    import std.range;
    void f(R)(R, void delegate(ElementType!R)) { }
    void main() { f([1], (int x) { }); }


    Error: template f does not match any function template declaration
    Error: template f(R) cannot deduce template function from argument types
!()(int[],void function(int x) pure nothrow @safe)

but it should obviously be able to infer the types...

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

Reply via email to