tests/dmd/fail_compilation/imports/c19762.d
raw| 1 | module imports.c19762; |
| 2 | |
| 3 | struct Foo |
| 4 | { |
| 5 | import ice19762 : X; |
| 6 | X[] x; |
| 7 | } |
| 8 | |
| 9 | Nullable!Foo foo() |
| 10 | { |
| 11 | Nullable!Foo output; |
| 12 | return output; |
| 13 | } |
| 14 | |
| 15 | struct Nullable(T) |
| 16 | { |
| 17 | bool opEquals(U)(const(U) rhs) const |
| 18 | if (is(typeof(this.get == rhs))) |
| 19 | { |
| 20 | return true; |
| 21 | } |
| 22 | |
| 23 | inout(T) get() inout |
| 24 | { |
| 25 | return T.init; |
| 26 | } |
| 27 | } |