gcc/testsuite/gdc.test/runnable/bug19652.d
raw| 1 | |
| 2 | struct Base { |
| 3 | int i; |
| 4 | } |
| 5 | |
| 6 | struct A { |
| 7 | Base base; |
| 8 | alias base this; |
| 9 | } |
| 10 | |
| 11 | struct B { |
| 12 | A a; |
| 13 | alias a this; |
| 14 | } |
| 15 | |
| 16 | auto otherTest(inout ref Base block) @nogc { assert(0); } |
| 17 | auto otherTest(inout ref A block) @nogc {} |
| 18 | |
| 19 | void main() { |
| 20 | B* thingie; |
| 21 | otherTest(*thingie); |
| 22 | } |