Bug 13235 – Wrong code on mutually recursive tuple type
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-08-01T12:24:00Z
Last change time
2014-12-10T01:39:01Z
Keywords
pull, wrong-code
Assigned to
nobody
Creator
timon.gehr
Comments
Comment #0 by timon.gehr — 2014-08-01T12:24:25Z
DMD 2.066.0-rc1
struct Tuple(T...){
pragma(msg, T); // shown twice!
T expand;
alias expand field;
this(T values){
field = values;
}
}
struct Foo{ Tuple!(int,Foo)* foo; }
static bar(T...)(T args){ }
void main(){
assert(Tuple!(int,Foo)(1,Foo()).expand[0] == 1);
}
The code should compile and run. This issue affects Phobos.
The assertion fails with DMD 2.060, so the bug is not new, just the ICE.
(So maybe this is not a regression, but it is hard to tell.)
Comment #1 by dlang-bugzilla — 2014-08-04T11:57:40Z
For the record I can't reproduce the ICE on Windows with either -m64 or -m32.
Comment #2 by timon.gehr — 2014-08-04T13:49:27Z
Interestingly enough, I can no longer reproduce the ICE on my linux machine either.