| 1 |
/* |
| 2 |
TEST_OUTPUT: |
| 3 |
--- |
| 4 |
fail_compilation/diag12124.d(14): Error: struct `diag12124.S1` `static opCall` is hidden by constructors and can never be called |
| 5 |
fail_compilation/diag12124.d(14): Please use a factory method instead, or replace all constructors with `static opCall`. |
| 6 |
fail_compilation/diag12124.d(20): Error: struct `diag12124.S2` `static opCall` is hidden by constructors and can never be called |
| 7 |
fail_compilation/diag12124.d(20): Please use a factory method instead, or replace all constructors with `static opCall`. |
| 8 |
--- |
| 9 |
*/ |
| 10 |
|
| 11 |
struct S1 |
| 12 |
{ |
| 13 |
this(int) {} |
| 14 |
static S1 opCall() { assert(0); } |
| 15 |
} |
| 16 |
|
| 17 |
struct S2 |
| 18 |
{ |
| 19 |
this(int) {} |
| 20 |
static S2 opCall()() { assert(0); } |
| 21 |
} |