Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Issue 8101 - Fixup pull improving diagnostics when there are over…
…loads.
- Loading branch information
1 parent
58445fb
commit cc37567
Showing
5 changed files
with
55 additions
and
13 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
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
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,34 @@ | ||
/* | ||
TEST_OUTPUT: | ||
--- | ||
fail_compilation/diag8101b.d(26): Error: None of the overloads of 'foo' are callable using argument types (double), candidates are: | ||
fail_compilation/diag8101b.d(17): diag8101b.S.foo(int _param_0) | ||
fail_compilation/diag8101b.d(18): diag8101b.S.foo(int _param_0, int _param_1) | ||
fail_compilation/diag8101b.d(28): Error: function diag8101b.S.bar (int _param_0) is not callable using argument types (double) | ||
fail_compilation/diag8101b.d(31): Error: None of the overloads of 'foo' are callable using a const object, candidates are: | ||
fail_compilation/diag8101b.d(17): diag8101b.S.foo(int _param_0) | ||
fail_compilation/diag8101b.d(18): diag8101b.S.foo(int _param_0, int _param_1) | ||
fail_compilation/diag8101b.d(33): Error: mutable method diag8101b.S.bar is not callable using a const object | ||
--- | ||
*/ | ||
|
||
struct S | ||
{ | ||
void foo(int) { } | ||
void foo(int, int) { } | ||
|
||
void bar(int) { } | ||
} | ||
|
||
void main() | ||
{ | ||
S s; | ||
s.foo(1.0); | ||
|
||
s.bar(1.0); | ||
|
||
const(S) cs; | ||
cs.foo(1); | ||
|
||
cs.bar(1); | ||
} |