-
-
Notifications
You must be signed in to change notification settings - Fork 608
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Issue 14554 - [REG2.066] dmd generate wrong error message for mu…
…ltiple template with same name
- Loading branch information
Showing
2 changed files
with
31 additions
and
1 deletion.
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,30 @@ | ||
| // REQUIRED_ARGS: -o- | ||
|
|
||
| /* | ||
| TEST_OUTPUT: | ||
| --- | ||
| fail_compilation/fail14554.d(28): Error: fail14554.issue14554_1.foo called with argument types (int) matches both: | ||
| fail_compilation/fail14554.d(17): fail14554.issue14554_1.foo!bool.foo(int j) | ||
| and: | ||
| fail_compilation/fail14554.d(18): fail14554.issue14554_1.foo!bool.foo(int j) | ||
| fail_compilation/fail14554.d(29): Error: fail14554.issue14554_2.foo called with argument types (int) matches both: | ||
| fail_compilation/fail14554.d(22): fail14554.issue14554_2.foo!bool.foo(int j) | ||
| and: | ||
| fail_compilation/fail14554.d(23): fail14554.issue14554_2.foo!bool.foo(int j) | ||
| --- | ||
| */ | ||
| struct issue14554_1 { | ||
| void foo(T)(int j) {} | ||
| static void foo(T)(int j) {} | ||
| } | ||
|
|
||
| struct issue14554_2 { | ||
| static void foo(T)(int j) {} | ||
| void foo(T)(int j) {} | ||
| } | ||
|
|
||
| void test14554() | ||
| { | ||
| issue14554_1.foo!bool(1); | ||
| issue14554_2.foo!bool(1); | ||
| } |