digitalmars.D.bugs - [Issue 22879] New: super call ignores overload in mixin
- d-bugmail puremagic.com (45/45) Mar 12 2022 https://issues.dlang.org/show_bug.cgi?id=22879
https://issues.dlang.org/show_bug.cgi?id=22879 Issue ID: 22879 Summary: super call ignores overload in mixin Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: tim.dlang t-online.de import std.stdio; class A { void f(){ writeln("A.f"); } } class B: A { alias f = A.f; mixin X!(); } mixin template X() { override void f(){ writeln("B.f"); super.f(); } } class C: B { override void f(){ writeln("C.f"); super.f(); } } void main() { (new C).f(); } The above code prints the following: C.f A.f Instead the following would be expected: C.f B.f A.f This affects DMD as a library, because ParseTimeTransitiveVisitor uses a mixin with overloads for visit. --
Mar 12 2022