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'
Comment #1 by yebblies — 2013-01-14T02:24:51Z
No ice with 2.056.
Comment #2 by k.hara.pg — 2013-01-22T05:36:35Z
Comment #3 by github-bugzilla — 2013-01-28T13:45:11Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/02c0599a6c0fedfc8456aea0cba713299d8d74d3 fix Issue 9174 - regression(2.057) ice(cast.c) with ternary operator and alias this Precedence 'alias this' resolving than integral promotion. https://github.com/D-Programming-Language/dmd/commit/998226026a0b050d5481fe1900c6cb10623f8ce1 Merge pull request #1533 from 9rnsr/fix9126 Issue 9174 - regression(2.057) ice(cast.c) with ternary operator and alias this