Fixed instantiation expression type param leak in body-less arrows#61054
Fixed instantiation expression type param leak in body-less arrows#61054Andarist wants to merge 4 commits intomicrosoft:mainfrom
Conversation
| export const test1 = <X,>(g: <A>(x: X) => X) => g<string>; | ||
| export const output1 = test1<number>((y: number) => 1); | ||
| output1(1); |
There was a problem hiding this comment.
The leaked type param was filtered out by the call to isTypeParameterPossiblyReferenced in getObjectTypeInstantiation. It was crucial for the bug that a body-less arrow function returned the instantiation expression. With a block function body isTypeParameterPossiblyReferenced would already return true.
|
@typescript-bot test it |
|
@jakebailey Here are the results of running the user tests with tsc comparing Everything looks good! |
|
Hey @jakebailey, the results of running the DT tests are ready. Everything looks the same! |
|
@jakebailey Here they are:
tscComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
Developer Information: |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@jakebailey Here are the results of running the top 400 repos with tsc comparing Everything looks good! |
fixes #61041