gcc/testsuite/gdc.test/fail_compilation/fail120.d
raw| 1 | /* |
| 2 | TEST_OUTPUT: |
| 3 | --- |
| 4 | fail_compilation/fail120.d(12): Error: accessing non-static variable `nodes` requires an instance of `Foo` |
| 5 | fail_compilation/fail120.d(13): Error: accessing non-static variable `nodes` requires an instance of `Foo` |
| 6 | --- |
| 7 | */ |
| 8 | |
| 9 | class Foo |
| 10 | { |
| 11 | int[2] nodes; |
| 12 | auto left = (){ return nodes[0]; }; |
| 13 | auto right = (){ return nodes[1]; }; |
| 14 | } |