https://issues.dlang.org/show_bug.cgi?id=21455
Issue ID: 21455
Summary: Cannot call an overload aliased from a base struct
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
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.
--