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
number extends T creates a substitution within the true branch - all references to number become number & T, since you just stated that all numbers were Ts. This then affects the apparent type which we get the signature from - the signature looks like (n: number & T) => void. I believe this is an artifact of us not tracking the variance of the position in question when looking for the constrained type at a position, and thus still doing a (covariant) constraint substitution in contravariant positions.
Bug Report
π Search Terms
conditional type narrow nongeneric
π Version & Regression Information
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
Error issued at
arg(10)
, even though by inspection this is always a legal call.π Expected behavior
Honestly, not sure.
The text was updated successfully, but these errors were encountered: