gcc/testsuite/gdc.test/fail_compilation/fail_casting2.d
raw| 1 | // REQUIRED_ARGS: -o- |
| 2 | |
| 3 | /* |
| 4 | TEST_OUTPUT: |
| 5 | --- |
| 6 | fail_compilation/fail_casting2.d(15): Error: type `int` is not an expression |
| 7 | fail_compilation/fail_casting2.d(17): Error: template lambda has no type |
| 8 | fail_compilation/fail_casting2.d(20): Error: template `Templ()` has no type |
| 9 | --- |
| 10 | */ |
| 11 | |
| 12 | void test15214() |
| 13 | { |
| 14 | alias Type = int; |
| 15 | cast(void)(Type); |
| 16 | |
| 17 | cast(void)(x => mixin(x)("mixin(x);")); |
| 18 | |
| 19 | template Templ() {} |
| 20 | cast(void)(Templ); |
| 21 | } |