Debian Codegraph @

gcc/testsuite/gdc.test/fail_compilation/fail209.d

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/fail209.d(20): Error: incompatible types for `(a) -= (x)`: `float` and `fail209.X`
5 ---
6 */
7
8 // https://issues.dlang.org/show_bug.cgi?id=725
9 // expression.c:6516: virtual Expression* MinAssignExp::semantic(Scope*): Assertion `e2->type->isfloating()' failed
10 class X
11 {
12 float a;
13 }
14
15 void main()
16 {
17 X x;
18 float a;
19
20 a -= x;
21 }