D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 14032 - [ICE](mtype.c line 154) with std.algorithm.tee
Summary: [ICE](mtype.c line 154) with std.algorithm.tee
Status: RESOLVED WORKSFORME
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Windows
: P1 enhancement
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-23 10:40 UTC by bearophile_hugs
Modified: 2020-03-21 03:56 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description bearophile_hugs 2015-01-23 10:40:15 UTC
int foo()() { return 1; }
void main() {
    import std.algorithm: tee;
    [1].tee!foo;
}


dmd2.067alpha gives:


...\dmd2\src\phobos\std\range\package.d(8194,22): Error: template instance fun!int does not match template declaration foo()()
Assertion failure: 'false' on line 154 in file 'mtype.c'