While this work:
---
mixin template Templ(T) {
void foo(T) {}
}
class C {
mixin Templ!int;
mixin Templ!string;
}
void main() {
auto c = new C;
c.foo("should work");
}
---
This does not:
---
mixin template Templ(T) {
this(T) {}
}
class C {
mixin Templ!int;
mixin Templ!string;
}
void main() {
auto c = new C("should work");
}
---
And fails with a bad error message:
> Error: overloadset `bn.C.__ctor` is aliased to a function
Sorry i should have precised that the bug will only start existing once https://issues.dlang.org/show_bug.cgi?id=17259 fixed. Which will come in a neat future. For now it's still an ICE. I'll see later if this is the same as 11500.
Comment #3 by dlang-bot — 2020-08-30T11:43:05Z
@NilsLankila created dlang/dmd pull request #11652 "fix issue 19729 - Constructor overloads coming from mixin are not resolved" fixing this issue:
- fix issue 19729 - Constructor overloads coming from mixin are not resolved
The test _b17259.d_ was created to check that an ICE was fixed but then this became a reject-valid.
Make it working for good this time.
https://github.com/dlang/dmd/pull/11652
Comment #4 by dlang-bot — 2020-09-04T13:16:50Z
dlang/dmd pull request #11652 "fix issue 19729 - Constructor overloads coming from mixin are not resolved" was merged into master:
- 45656385de8b9f443941a260ae0a4cee253e6c78 by Nils Lankila:
fix issue 19729 - Constructor overloads coming from mixin are not resolved
The test _b17259.d_ was created to check that an ICE was fixed but then this became a reject-valid.
Make it working for good this time.
https://github.com/dlang/dmd/pull/11652