Fixed regression in generic signature instantiation with default type args#59510
Conversation
|
@typescript-bot test it |
|
Hey @jakebailey, the results of running the DT tests are ready. Everything looks the same! |
|
@jakebailey Here are the results of running the user tests with tsc comparing Everything looks good! |
|
@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! |
weswigham
left a comment
There was a problem hiding this comment.
Needs a merge conflict resolved before it can be merged - but I'm starting to think it'd be nice to pull sameMap(signature.typeParameters!, tp => tp.mapper ? instantiateType(tp, tp.mapper) : tp) into a helper function like getTypeParametersForMapper(signature) for the two locations we use it (an inference context is a type mapper).
…ure-instantiation-with-default-type-arg
|
done and done :) |
|
@typescript-bot cherry-pick to release-5.5 This is the same fix as #59121 which we also backported to 5.5. |
|
Hey, @jakebailey! I've created #59570 for you. |
fixes #59490
complements the fix from #59121 so the correct cloned type parameter is used as the inference target
cc @weswigham