Skip to content

Conversation

@dsyme
Copy link
Contributor

@dsyme dsyme commented Sep 23, 2022

Fixes #13965

The fix is conservative in that name resolution filters extension members on static v. instance (except on error diagnostic paths when all get included)

As a side note, realistically we could have name resolution filter more content on static v. instance which would allow, for example, static methods to have the same name as instance methods. This is allowed in C# but not allowed in F#. However we don't currently do this and there's no particular language suggestion for it. I've written the code so that the same types could be extended to that.

It's important to do the filtering for (instance) extension methods because they can definitely have the same name as static content in the type (nested types, properties etc.).

  • Add test from the bug above

@dsyme dsyme changed the title fix unqualified name resolution for nested types in presence of instance extension members Fix unqualified name resolution in presence of instance extension members with matching names Sep 23, 2022
@dsyme dsyme changed the title Fix unqualified name resolution in presence of instance extension members with matching names [WIP] Fix static name resolution in presence of instance extension members with matching names Sep 23, 2022
@dsyme dsyme changed the title [WIP] Fix static name resolution in presence of instance extension members with matching names Fix static name resolution in presence of instance extension members with matching names Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Instance extension methods block legitimate unqualified name resolutions

4 participants