mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
24 lines
473 B
D
24 lines
473 B
D
// REQUIRED_ARGS: -de
|
|
struct S
|
|
{
|
|
deprecated void foo(T)(int) { }
|
|
void foo(T)(string) { }
|
|
}
|
|
|
|
// just to be safe, check this order too
|
|
// (there were some issues where naive checks of overloads were order dependent)
|
|
struct T
|
|
{
|
|
void foo(T)(string) { }
|
|
deprecated void foo(T)(int) { }
|
|
}
|
|
|
|
void main()
|
|
{
|
|
// this should not hit the deprecation
|
|
// because the parameter type doesn't match it
|
|
S().foo!int("hi");
|
|
|
|
// likewise
|
|
T().foo!int("hi");
|
|
}
|