gcc/testsuite/gdc.test/fail_compilation/fail301.d
raw| 1 | /* |
| 2 | TEST_OUTPUT: |
| 3 | --- |
| 4 | fail_compilation/fail301.d(11): Error: accessing non-static variable `guard` requires an instance of `bug3305b` |
| 5 | fail_compilation/fail301.d(22): Error: template instance `fail301.bug3305!0` error instantiating |
| 6 | --- |
| 7 | */ |
| 8 | |
| 9 | struct bug3305(alias X = 0) |
| 10 | { |
| 11 | auto guard = bug3305b!(0).guard; |
| 12 | } |
| 13 | |
| 14 | struct bug3305b(alias X = 0) |
| 15 | { |
| 16 | bug3305!(X) goo; |
| 17 | auto guard = 0; |
| 18 | } |
| 19 | |
| 20 | void test() |
| 21 | { |
| 22 | bug3305!(0) a; |
| 23 | } |