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
{{ message }}
Repository navigation
Quickinfo incorrectly computes zero-candidate type parameter with contextual inference candidate #44879
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.
Activity
[-]Probable bug: Inconsistency between compilation and intellisense in case of contextual inference at call-site[/-]RyanCavanaugh commentedon 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 aTand return some supertype of that in$", which doesn't really make any sense.devanshj commentedon Jul 7, 2021
Yeah it was sort of a workaround, it should have simply been
$: <T>(s: T) => { $: T }(the$1version) as you said here.