| 1 |
/* REQUIRED_ARGS: -de -unittest |
| 2 |
TEST_OUTPUT: |
| 3 |
--- |
| 4 |
fail_compilation/fail21830.d(24): Deprecation: struct `fail21830.OldS21830` is deprecated - Deprecated type |
| 5 |
fail_compilation/fail21830.d(24): Deprecation: template `fail21830.test21830(T)(T t) if (is(T == OldS21830))` is deprecated - Deprecated template |
| 6 |
fail_compilation/fail21830.d(24): Deprecation: struct `fail21830.OldS21830` is deprecated - Deprecated type |
| 7 |
--- |
| 8 |
*/ |
| 9 |
#line 1 |
| 10 |
deprecated("Deprecated type") |
| 11 |
struct OldS21830 { } |
| 12 |
|
| 13 |
struct NewS21830 { } |
| 14 |
|
| 15 |
static if (1) |
| 16 |
{ |
| 17 |
auto test21830(T)(T t) |
| 18 |
if (is(T == NewS21830)) |
| 19 |
{ |
| 20 |
return T.init; |
| 21 |
} |
| 22 |
} |
| 23 |
|
| 24 |
deprecated("Deprecated template") |
| 25 |
auto test21830(T)(T t) |
| 26 |
if (is(T == OldS21830)) |
| 27 |
{ |
| 28 |
return T.init; |
| 29 |
} |
| 30 |
|
| 31 |
unittest |
| 32 |
{ |
| 33 |
auto b = test21830(OldS21830()); |
| 34 |
} |