Bug 9174 – regression(2.057) ice(cast.c) with ternary operator and alias this
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-12-17T15:57:00Z
Last change time
2013-01-28T14:39:46Z
Keywords
ice, pull, rejects-valid
Assigned to
nobody
Creator
bearophile_hugs
Comments
Comment #0 by bearophile_hugs — 2012-12-17T15:57:28Z
struct Foo {
char x;
alias x this;
}
void main() {
auto r = true ? 'A' : Foo();
}
DMD 2.061alpha gives:
Assertion failure: 't1->ty == t2->ty' on line 2463 in file 'cast.c'