gcc/testsuite/gdc.test/fail_compilation/ice9338.d
raw| 1 | /* |
| 2 | TEST_OUTPUT: |
| 3 | --- |
| 4 | fail_compilation/ice9338.d(13): Error: value of `this` is not known at compile time |
| 5 | fail_compilation/ice9338.d(14): Error: value of `this` is not known at compile time |
| 6 | --- |
| 7 | */ |
| 8 | |
| 9 | class Foo |
| 10 | { |
| 11 | void test() |
| 12 | { |
| 13 | enum members1 = makeArray(); |
| 14 | enum members2 = this.makeArray(); |
| 15 | } |
| 16 | |
| 17 | string[] makeArray() |
| 18 | { |
| 19 | return ["a"]; |
| 20 | } |
| 21 | } |