struct Base {
void foo(int) {
}
}
struct Derived {
Base base;
alias base this;
alias foo = Base.foo;
void foo() {
foo(1);
}
}
onlineapp.d(13): Error: this for foo needs to be type Base not type Derived
Obviously, this should compile because Derived implicitly converts to Base.
Comment #1 by robert.schadek — 2024-12-13T19:13:18Z