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
This looks pretty similar to https://issues.dlang.org/show_bug.cgi?id=11500
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.
@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
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