mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00
23 lines
352 B
D
23 lines
352 B
D
// REQUIRED_ARGS: -unittest -de
|
|
|
|
auto test18251(T)(T t)
|
|
if (!__traits(isDeprecated, T))
|
|
{
|
|
return T.init;
|
|
}
|
|
|
|
unittest
|
|
{
|
|
auto b = test18251(2);
|
|
}
|
|
|
|
deprecated auto test18251(T)(T t) // deprecated storage class got lost when expanding.
|
|
if (__traits(isDeprecated, T))
|
|
{
|
|
return T.init;
|
|
}
|
|
|
|
deprecated unittest
|
|
{
|
|
auto b = test18251(2 + 2i);
|
|
}
|