Skip to content
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

[mono] Default Interface Implementation of Static Virtual Methods #67540

Open
Tracked by #49904 ...
lambdageek opened this issue Apr 4, 2022 · 4 comments
Open
Tracked by #49904 ...

[mono] Default Interface Implementation of Static Virtual Methods #67540

lambdageek opened this issue Apr 4, 2022 · 4 comments
Assignees
Milestone

Comments

@lambdageek
Copy link
Member

See the CoreCLR PR #66887 that adds the svm_diamondshape test case.

Mono should support default interface implementations of static virtual methods (including overrides).

@lambdageek lambdageek added this to the 7.0.0 milestone Apr 4, 2022
@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Apr 4, 2022
@lambdageek
Copy link
Member Author

/cc @SamMonoRT @BrzVlad

@lambdageek
Copy link
Member Author

Related #80350 (comment) and #54399

@BrzVlad
Copy link
Member

BrzVlad commented Jul 26, 2023

Some more context. This issue and the ones @lambdageek mentioned are probably duplicates for the svm_diamondshape runtime test failing on mono. The test in question passes if we mark the reabstraction of Func in I4Reabstract as final. From what I've seen, Roslyn also marks these as final and other IL runtime tests do the same. Mono currently considers these static virtual methods as being reabstracted if they are both abstract and final, in which case we don't allocate a newslot for them. Discussion around this was started in #83189, but to me it is still not exactly clear what needs to be done on mono side.

From what I could find, there is this comment in CoreCLR code "Re-abstractions are virtual static abstract with a MethodImpl". Does this mean that, for reabstraction, rather than checking for final flag, we should check in the metadata if the static virtual abstract method has an explicit .override instead ? @lambdageek any idea how easy would be to add this check, do we have anything cached somewhere ? @davidwrighton Could you confirm what we should do here so we can close these issues ?

@BrzVlad
Copy link
Member

BrzVlad commented Aug 7, 2023

Doesn't look like we'll get this addressed in .net 8, moving milestone. Also this issue is present only when writing IL code, not from C#, so it is not critical.

@BrzVlad BrzVlad modified the milestones: 8.0.0, 9.0.0 Aug 7, 2023
@BrzVlad BrzVlad modified the milestones: 9.0.0, 10.0.0 Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants