gcc/testsuite/gdc.test/fail_compilation/ice16657.d
raw| 1 | /* |
| 2 | TEST_OUTPUT: |
| 3 | --- |
| 4 | fail_compilation/ice16657.d(9): Error: function `ice16657.RefCounted.refCountedPayload` has no `return` statement, but is expected to return a value of type `inout(RefCounted)` |
| 5 | --- |
| 6 | */ |
| 7 | struct RefCounted |
| 8 | { |
| 9 | inout(RefCounted) refCountedPayload() inout { } |
| 10 | alias refCountedPayload this; |
| 11 | } |
| 12 | |
| 13 | struct Store |
| 14 | { |
| 15 | RefCounted p; |
| 16 | } |