-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default Interface Method Base Calls #32054
Comments
According to my notes, for a base call like base(Type).M(); where
interface A
{
void M();
}
interface B : A
{
override A.M() {}
}
interface C : A
{
override A.M() {}
}
interface D : B, C
{
}
interface E : D
{
override A.M()
{
base(D).M(); // error due to A.M not having a most specific override in D
}
} The marked line satisfies condition (1) as |
LDM (2019-04-29) decided to remove the base(Type) syntax from the scope of C# 8.0. This issue is tracking the work to put it back into the product once we have support from CLR. |
Closing for now because we don't have concrete plan to add this feature in the next release. |
Related: dotnet/csharplang#2337 |
The LDM decided on the base invocation syntax
base(N.I1<T>).M(s)
. We also decided that the syntax should be permitted in classes (e.g. to invoke an implementation from a skip-base class or a base interface).This needs to be implemented in the compiler. Also, we need to decide on an implementation strategy. What IL would that generate? Since interface implementations are currently private methods, it may require further CLR changes.
The text was updated successfully, but these errors were encountered: