| 1 |
/* |
| 2 |
TEST_OUTPUT: |
| 3 |
--- |
| 4 |
fail_compilation/fail18985.d(20): Error: operator `+=` not supported for `foo` of type `C` |
| 5 |
fail_compilation/fail18985.d(13): perhaps implement `auto opOpAssign(string op : "+")(int) {}` |
| 6 |
fail_compilation/fail18985.d(21): Error: operator `+=` not supported for `bar` of type `C` |
| 7 |
fail_compilation/fail18985.d(13): perhaps implement `auto opOpAssign(string op : "+")(int) {}` |
| 8 |
--- |
| 9 |
*/ |
| 10 |
|
| 11 |
// https://issues.dlang.org/show_bug.cgi?id=18985 |
| 12 |
|
| 13 |
class C {} |
| 14 |
|
| 15 |
C foo; |
| 16 |
shared C bar; |
| 17 |
|
| 18 |
void main() |
| 19 |
{ |
| 20 |
foo += 1; |
| 21 |
bar += 1; |
| 22 |
} |