summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test/fail_compilation/fail209.d
blob: 689fd7bc542ed9bd6eebb94dae56a2c9b0f0e1d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
TEST_OUTPUT:
---
fail_compilation/fail209.d(20): Error: incompatible types for `(a) -= (x)`: `float` and `fail209.X`
---
*/

// https://issues.dlang.org/show_bug.cgi?id=725
// expression.c:6516: virtual Expression* MinAssignExp::semantic(Scope*): Assertion `e2->type->isfloating()' failed
class X
{
    float a;
}

void main()
{
    X x;
    float a;

    a -= x;
}