| 1 |
/* |
| 2 |
TEST_OUTPUT: |
| 3 |
--- |
| 4 |
fail_compilation/fail19729.d(35): Error: `fail19729.C.__ctor` called with argument types `(string)` matches multiple overloads exactly: |
| 5 |
fail_compilation/fail19729.d(18): `fail19729.C.Templ!string.this(string t)` |
| 6 |
and: |
| 7 |
fail_compilation/fail19729.d(18): `fail19729.C.Templ!string.this(string t)` |
| 8 |
fail_compilation/fail19729.d(36): Error: `fail19729.D.__ctor` called with argument types `(string)` matches multiple overloads after qualifier conversion: |
| 9 |
fail_compilation/fail19729.d(18): `fail19729.D.Templ!(const(char)[]).this(const(char)[] t)` |
| 10 |
and: |
| 11 |
fail_compilation/fail19729.d(18): `fail19729.D.Templ!(const(char)*).this(const(char)* t)` |
| 12 |
--- |
| 13 |
*/ |
| 14 |
module fail19729; |
| 15 |
|
| 16 |
mixin template Templ(T) |
| 17 |
{ |
| 18 |
this(T t) { } |
| 19 |
} |
| 20 |
|
| 21 |
class C |
| 22 |
{ |
| 23 |
mixin Templ!string; |
| 24 |
mixin Templ!string; |
| 25 |
} |
| 26 |
|
| 27 |
class D |
| 28 |
{ |
| 29 |
mixin Templ!(const(char)*); |
| 30 |
mixin Templ!(const(char)[]); |
| 31 |
} |
| 32 |
|
| 33 |
void main() |
| 34 |
{ |
| 35 |
new C("conflict"); |
| 36 |
new D("conflict"); |
| 37 |
} |