gcc/testsuite/gdc.test/fail_compilation/fail8724.d
raw| 1 | // REQUIRED_ARGS: -w |
| 2 | /* |
| 3 | TEST_OUTPUT: |
| 4 | --- |
| 5 | fail_compilation/fail8724.d(14): Error: `object.Exception` is thrown but not caught |
| 6 | fail_compilation/fail8724.d(12): Error: constructor `fail8724.Foo.this` may throw but is marked as `nothrow` |
| 7 | --- |
| 8 | */ |
| 9 | |
| 10 | struct Foo |
| 11 | { |
| 12 | this(int) nothrow |
| 13 | { |
| 14 | throw new Exception("something"); |
| 15 | } |
| 16 | } |