Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue 21372: remove premature deprecation check.
- Loading branch information
1 parent
90d30a7
commit d2730e5
Showing
2 changed files
with
24 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// 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"); | ||
} |