gcc/testsuite/gdc.test/fail_compilation/mixin.d
raw| 1 | // REQUIRED_ARGS: -mixin=${RESULTS_DIR}/fail_compilation/mixin_test.mixin |
| 2 | /* |
| 3 | TEST_OUTPUT: |
| 4 | --- |
| 5 | {{RESULTS_DIR}}/fail_compilation/mixin_test.mixin(7): Error: undefined identifier `b` |
| 6 | --- |
| 7 | */ |
| 8 | |
| 9 | // https://issues.dlang.org/show_bug.cgi?id=1870 |
| 10 | // https://issues.dlang.org/show_bug.cgi?id=12790 |
| 11 | string get() |
| 12 | { |
| 13 | return |
| 14 | q{int x; |
| 15 | int y; |
| 16 | |
| 17 | |
| 18 | |
| 19 | int z = x + b;}; |
| 20 | } |
| 21 | |
| 22 | void main() |
| 23 | { |
| 24 | mixin(get()); |
| 25 | } |