gcc/testsuite/gdc.test/fail_compilation/fail18994.d
raw| 1 | /* |
| 2 | TEST_OUTPUT: |
| 3 | --- |
| 4 | fail_compilation/fail18994.d(19): Error: struct `fail18994.Type1` is not copyable because it has a disabled postblit |
| 5 | --- |
| 6 | */ |
| 7 | struct Type2 |
| 8 | { |
| 9 | int opApply(int delegate(ref Type1)) { return 0; } |
| 10 | } |
| 11 | |
| 12 | struct Type1 |
| 13 | { |
| 14 | @disable this(this); |
| 15 | } |
| 16 | |
| 17 | void test() |
| 18 | { |
| 19 | foreach(b; Type2()) {} |
| 20 | } |