4 fail_compilation/fail297.d(30): Error: incompatible types for `(Bar()) + (baz())`: `Bar` and `const(Bar)`
8 // https://issues.dlang.org/show_bug.cgi?id=1969
9 // ICE(cod1.c) using undefined operator with one const operand
10 // ICE or wrong-code. D2 only. Internal error: backend\cod1.c 1673
11 /* Root cause: BinExp::typeCombine() is checking for an _exact_ match, but
12 typeMerge() will return success.
14 PATCH: cast.c BinExp::typeCombine().
15 Compare the immutable versions of the types, instead of the types themselves.
17 if (op == TOKmin || op == TOKadd)
19 if (t1->ito == t2->ito && (t1->ty == Tstruct || t1->ty == Tclass))
26 const(Bar
) baz() { return Bar(); }
30 Bar result
= Bar() + baz();