[Issue 20612] New: alias overload set cause mixin overload function strange behavior
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Feb 26 08:05:32 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=20612
Issue ID: 20612
Summary: alias overload set cause mixin overload function
strange behavior
Product: D
Version: D2
Hardware: x86_64
OS: Windows
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: yunwind at msn.com
import core.stdc.stdio;
class T {
void test() {
printf("t\n");
}
}
class T1 : T {
alias T.test test;
mixin Foo;
}
template Foo() {
override void test() {
printf("t1\n");
}
}
class T2 : T1 {
override void test() {
printf("t2\n");
super.test();
}
}
void main()
{
auto t2 = new T2;
t2.test(); //output t2, t
auto t1 = new T1;
t1.test(); //output t1
}
--
More information about the Digitalmars-d-bugs
mailing list