| 1 |
// REQUIRED_ARGS: -de |
| 2 |
/* TEST_OUTPUT: |
| 3 |
--- |
| 4 |
fail_compilation/b19691e.d(16): Error: forward reference to template `this` |
| 5 |
fail_compilation/b19691e.d(16): Error: constructor `b19691e.S2.this(int a, S1 s = "")` is not callable using argument types `(int, string)` |
| 6 |
fail_compilation/b19691e.d(16): Error: forward reference to template `this` |
| 7 |
--- |
| 8 |
*/ |
| 9 |
// https://issues.dlang.org/show_bug.cgi?id=19691 |
| 10 |
module b19691e; |
| 11 |
|
| 12 |
struct S1 |
| 13 |
{ |
| 14 |
this(T)(T) |
| 15 |
{ |
| 16 |
S2(42, ""); |
| 17 |
} |
| 18 |
} |
| 19 |
|
| 20 |
struct S2 |
| 21 |
{ |
| 22 |
this(int a, S1 s = ""){} |
| 23 |
} |