gcc/testsuite/gdc.test/compilable/test21830.d
raw| 1 | // REQUIRED_ARGS: -de -unittest |
| 2 | |
| 3 | deprecated struct OldS21830 { } |
| 4 | |
| 5 | struct NewS21830 { } |
| 6 | |
| 7 | static if (1) |
| 8 | { |
| 9 | auto test21830(T)(T t) |
| 10 | if (is(T == NewS21830)) |
| 11 | { |
| 12 | return T.init; |
| 13 | } |
| 14 | } |
| 15 | |
| 16 | deprecated auto test21830(T)(T t) |
| 17 | if (is(T == OldS21830)) |
| 18 | { |
| 19 | return T.init; |
| 20 | } |
| 21 | |
| 22 | unittest |
| 23 | { |
| 24 | auto b = test21830(NewS21830()); // error here about using test21830!OldS21830 |
| 25 | } |