D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7250 - [UFCS] UFCS chaining doesn't work
Summary: [UFCS] UFCS chaining doesn't work
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other Windows
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-08 18:55 UTC by David Simcha
Modified: 2012-03-19 11:56 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description David Simcha 2012-01-08 18:55:59 UTC
import std.algorithm, std.array;

void main() {
    auto arr = [1, 2, 3, 4, 5];
    int toAdd = 42;
    auto arr2 = arr.map!(a => a + toAdd)().array();
}

test.d(6): Error: no property 'array' for type 'Result'
Comment 1 Brad Anderson 2012-03-19 11:19:17 UTC
I've tested and this works fine in 2.059 HEAD as of today. It should be closed (I'm not sure of the protocol who closes issues or I'd just close it myself).
Comment 2 bearophile_hugs 2012-03-19 11:56:55 UTC
This is now working. It's currently working even too much well (see Bug 7722 that already has a patch).