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 #3274 from 9rnsr/2.065
Pick up changes from master to 2.065 branch
- Loading branch information
Showing
3 changed files
with
54 additions
and
0 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,21 @@ | ||
/* | ||
TEST_OUTPUT: | ||
--- | ||
fail_compilation/diag12124.d(14): Error: struct diag12124.S1 static opCall is hidden by constructors and can never be called | ||
fail_compilation/diag12124.d(14): Please use a factory method instead, or replace all constructors with static opCall. | ||
fail_compilation/diag12124.d(20): Error: struct diag12124.S2 static opCall is hidden by constructors and can never be called | ||
fail_compilation/diag12124.d(20): Please use a factory method instead, or replace all constructors with static opCall. | ||
--- | ||
*/ | ||
|
||
struct S1 | ||
{ | ||
this(int) {} | ||
static S1 opCall() { assert(0); } | ||
} | ||
|
||
struct S2 | ||
{ | ||
this(int) {} | ||
static S2 opCall()() { assert(0); } | ||
} |
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