-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed instantiation expression type param leak in body-less arrows #61054
base: main
Are you sure you want to change the base?
Fixed instantiation expression type param leak in body-less arrows #61054
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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