Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3734 from 9rnsr/fix13082
Issue 13082 - Spurious error message with failed call to class ctor
- Loading branch information
1 parent
d30cd00
commit fb2c3b6
Showing
2 changed files
with
29 additions
and
9 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 @@ | ||
/* | ||
TEST_OUTPUT: | ||
--- | ||
fail_compilation/diag13082.d(22): Error: constructor diag13082.C.this (int a) is not callable using argument types (string) | ||
fail_compilation/diag13082.d(23): Error: constructor diag13082.S.this (int a) is not callable using argument types (string) | ||
--- | ||
*/ | ||
|
||
class C | ||
{ | ||
this(int a) {} | ||
} | ||
|
||
struct S | ||
{ | ||
this(int a) {} | ||
} | ||
|
||
void main() | ||
{ | ||
string b; | ||
auto c = new C(b); | ||
auto s = new S(b); | ||
} |