https://issues.dlang.org/show_bug.cgi?id=15734

          Issue ID: 15734
           Summary: Need this for map
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nob...@puremagic.com
          Reporter: temta...@gmail.com

import std.algorithm;

class S {
    int foo(int a) { return a; }

    void test() {
        [ 1, 2, 3 ].map!foo;
    }
}

Error: this for foo needs to be type S not type MapResult!(foo, int[])

changing foo to (a => foo(a))
makes it compileable

--

Reply via email to