Bug 19729 – Constructor overloads coming from mixin are not resolved

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-03-10T23:23:41Z
Last change time
2020-09-04T13:16:50Z
Keywords
pull, rejects-valid
Assigned to
No Owner
Creator
Basile-z
See also
https://issues.dlang.org/show_bug.cgi?id=11500

Comments

Comment #0 by b2.temp — 2019-03-10T23:23:41Z
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
Comment #1 by elpenguino+D — 2019-03-10T23:29:11Z
Comment #2 by b2.temp — 2019-03-10T23:41:44Z
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