T t; S s; struct S{ T get() const {return t;} alias get this; } struct T{ S get() const {return s;} alias get this; } static assert(is(typeof(1? t:s))); Fails with: dmd: cast.c:1908: int typeMerge(Scope*, Expression*, Type**, Expression**, Expression**): Assertion `!(i1 && i2)' failed.
In this case, S and T don't have common type. With the expression (1? t:s), two expansions of alias this exist. One of them is 1? t.get():s, type == S Other is 1? t:s.get(), type == T This ambiguate should cause error. But, ICE is bad. It should be fixed.
https://github.com/D-Programming-Language/dmd/pull/466
https://github.com/D-Programming-Language/dmd/commit/57db617ba6eec8ce67bb3f20d33022d534a5dba2