gcc/testsuite/gdc.test/fail_compilation/test20023.d
raw| 1 | // REQUIRED_ARGS: -preview=dip1000 -preview=dip1008 -Ifail_compilation/extra-files |
| 2 | // https://issues.dlang.org/show_bug.cgi?id=20023 |
| 3 | /* |
| 4 | TEST_OUTPUT: |
| 5 | --- |
| 6 | fail_compilation/imports/test20023b.d(8): Error: returning scope variable `e` is not allowed in a `@safe` function |
| 7 | fail_compilation/test20023.d(15): Error: template instance `imports.test20023b.threw!()` error instantiating |
| 8 | --- |
| 9 | */ |
| 10 | import imports.test20023b; |
| 11 | |
| 12 | @safe: |
| 13 | void main() |
| 14 | { |
| 15 | threw!()(); |
| 16 | } |