Eta reduction should works with implicit operator #8048
Replies: 2 comments 17 replies
-
Is this actually a language spec issue or is it just a Roslyn bug? |
Beta Was this translation helpful? Give feedback.
-
I think this is working as intended: Another way to see this is that Implicit conversion operators are not magic at run time. The compiler inserts calls to them, and at run time they are method calls like any other. (With On the other hand, delegate variance works because implicit reference conversions do nothing at run time, so the same delegate object can be used. As for the CS0411 error, try to specify the type arguments. There is no combination of type arguments that makes it work. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The methods CallProcess1 and CallProcess2 should be identical but the CallProcess2 gets compile error CS0411: The type arguments for method cannot be inferred from the usage
But it works in this cases:
Beta Was this translation helpful? Give feedback.
All reactions