mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
25 lines
375 B
D
25 lines
375 B
D
// REQUIRED_ARGS: -de -unittest
|
|
|
|
deprecated struct OldS21830 { }
|
|
|
|
struct NewS21830 { }
|
|
|
|
static if (1)
|
|
{
|
|
auto test21830(T)(T t)
|
|
if (is(T == NewS21830))
|
|
{
|
|
return T.init;
|
|
}
|
|
}
|
|
|
|
deprecated auto test21830(T)(T t)
|
|
if (is(T == OldS21830))
|
|
{
|
|
return T.init;
|
|
}
|
|
|
|
unittest
|
|
{
|
|
auto b = test21830(NewS21830()); // error here about using test21830!OldS21830
|
|
}
|