Comment #0 by andrej.mitrovich — 2011-08-02T05:47:40Z
DMD 2.054, XP32:
import std.algorithm;
void main()
{
alias reduce!((a, b){ return min(a, b); }) rngMin2;
auto arr2 = map!(rngMin2)([[1, 2], [1, 2]]);
}
Internal error: toir.c 190
The code above can be written simpler like below:
import std.algorithm;
void main()
{
alias reduce!(min) rngMin;
auto arr1 = map!(rngMin)([[1, 2], [1, 2]]); // ok
}
But that's beside the point.
Comment #1 by bearophile_hugs — 2011-08-22T15:00:38Z
Same as 4504 ?
Comment #2 by bugzilla — 2012-03-12T20:40:40Z
(In reply to comment #1)
> Same as 4504 ?
No.
Comment #3 by necroment — 2012-07-29T06:47:52Z
DMD 2.069, OS X 10.6.8
Reduced test case:
template unaryFun(alias fun) {
alias fun unaryFun;
}
template map(fun...) {
auto map(Range)(Range ) {
alias unaryFun!fun _fun;
@property back() {
_fun;
}
}
}
template reduce(fun...) {
auto reduce()() {}
}
void main() {
alias reduce!({}) rngMin2;
map!rngMin2([]);
}
Comment #4 by andrej.mitrovich — 2012-10-04T14:20:10Z
(In reply to comment #3)
> DMD 2.069, OS X 10.6.8
>
> Reduced test case:
Your test case works, but my OP sample doesn't ICE anymore, instead it errors:
Error: function std.algorithm.MapResult!(reduce,int[][]).MapResult.back cannot get frame pointer to reduce
Error: function std.algorithm.MapResult!(reduce,int[][]).MapResult.front cannot get frame pointer to reduce
Error: function std.algorithm.MapResult!(reduce,int[][]).MapResult.opIndex cannot get frame pointer to reduce
Comment #5 by andrej.mitrovich — 2012-10-04T14:21:02Z
Anyway it's not a blocker.
Comment #6 by github-bugzilla — 2012-11-15T06:40:49Z