Replies: 2 comments
-
Is this an edge case of overload resolution? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Yes. The language is doing overload resolution on the full set of methods (not considering static vs member), picking the best (which is the static member in this case) and then generating the error. I would suppose the feature request would be to change overload resolution to consider the context (static vs member) when selecting the candidate methods. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
@karczk commented on Thu Sep 21 2017
Steps to Reproduce:
Expected Behavior:
Should compile, there is only one instance method and string is an object.
Actual Behavior:
Does not compile:
@dpoeschl commented on Thu Sep 21 2017
This sounds more like a feature request for the language, since the error message is pretty clear that this is not expected to work. Feel free to port to https://github.com/dotnet/csharplang/issues if you'd like to propose a change to the language.
@jcouv commented on Thu Dec 14 2017
Moving language design discussions to csharplang repo.
Beta Was this translation helpful? Give feedback.
All reactions