CS0704 with generics - update to auto interpret? #83507
Unanswered
UniqeId6542
asked this question in
Ideas
Replies: 2 comments 3 replies
-
|
To make Roslyn behave differently, you'd need the language to change here. That starts with a discussion you would need to open first at dotnet/csharplang. Be clear in what you're asking for. |
Beta Was this translation helpful? Give feedback.
2 replies
-
|
I don't even understand how this is supposed to work? You can't call extension methods on open generic because there is no valid receiver at all to call it upon. You can't even replace it with the static method call syntax for these reasons, what would the |
Beta Was this translation helpful? Give feedback.
1 reply
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.
-
I cannot use an extension method on an open generic, but I can use that same method if I call it from the declaring class type.
Is anything preventing the compiler from auto-interpreting an extension method call into the normal static call?
What extra knowledge would be needed to do this 'conversion' behind the scenes?
Could Roslyn be updated to support the open-generic use case for this type of extension method?
Beta Was this translation helpful? Give feedback.
All reactions