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

Implement IEnumerator interface explicitly to satisfy dotnet linker #80

Merged
merged 1 commit into from
Nov 26, 2022

Conversation

maxkatz6
Copy link
Collaborator

See this unusual stack trace for more context: AvaloniaUI/Avalonia#9127 (comment)

For some unknown reason that would be unreasonably complicated to find out why, dotnet/linker removes IEnumerator interface method implementations from the Enumerator class which we generate. Might be something related to their issues with cecil dotnet/linker#1187

NativeAOT linked works just fine with implicit methods.
But for mono/linker changing methods to explicitly implement interface helps here.
Other possible reasons: linker doesn't have enough information, because we use this enumerator from "object GetService(Type)" method, or we simply have a mistake in IL generation somewhere (or Cecil has). Like, our methods unnecessarily marked as "virtual" by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants