[Issue 15734] New: Need this for map
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Feb 28 13:47:38 PST 2016
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: nobody at puremagic.com
Reporter: temtaime at 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
--
More information about the Digitalmars-d-bugs
mailing list