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 {
thisS113     this(int) {}
opCallS114     static S1 opCall() { assert(0); }
15 }
16 
17 struct S2
18 {
this(int)19     this(int) {}
opCall()20     static S2 opCall()() { assert(0); }
21 }
22