You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Code should compile. Especially when the intellisense gets the type parameters right and also provides completions.
Expected type parameters and return type -
Expected completion -
But doesn't compile and gives error -
The text was updated successfully, but these errors were encountered:
RyanCavanaugh
changed the title
Probable bug: Inconsistency between compilation and intellisense in case of contextual inference at call-site
Quickinfo incorrectly computes zero-candidate type parameter with contextual inference candidate
Jul 6, 2021
The compile-time inference is correct. I'm not sure what $ is trying to accomplish, but it's not written in a way that can produce meaningful results -- it says "I take a T and return some supertype of that in $", which doesn't really make any sense.
Bug Report
π Search Terms
intellisense, contextual inference, call site inference
Related: #44821
π Version & Regression Information
Tested with v4.3.4
β― Playground Link
Playground
π» Code
π Actual behavior
Code does not compile
π Expected behavior
Code should compile. Especially when the intellisense gets the type parameters right and also provides completions.
Expected type parameters and return type -
Expected completion -
But doesn't compile and gives error -
The text was updated successfully, but these errors were encountered: