gcc/testsuite/gdc.test/fail_compilation/fail228.d
raw| 1 | /* |
| 2 | TEST_OUTPUT: |
| 3 | --- |
| 4 | fail_compilation/fail228.d(22): Error: undefined identifier `localVariable` |
| 5 | --- |
| 6 | */ |
| 7 | |
| 8 | //import core.stdc.stdio : printf; |
| 9 | |
| 10 | int ToTypeString(T : int)() |
| 11 | { |
| 12 | return 1; |
| 13 | } |
| 14 | |
| 15 | int ToTypeString(T : string)() |
| 16 | { |
| 17 | return 2; |
| 18 | } |
| 19 | |
| 20 | void main() |
| 21 | { |
| 22 | auto x = ToTypeString!(typeof(localVariable))(); |
| 23 | } |