Uh oh!
There was an error while loading. Please reload this page.
Clean up inference of type parameters, contravariant types - #49915
Conversation
Jake Bailey (jakebailey)
commented
Jul 15, 2022
TypeScript Bot (@typescript-bot) test this |
Heya Jake Bailey (@jakebailey), I've started to run the extended test suite on this PR at 01789d3. You can monitor the build here. |
Heya Jake Bailey (@jakebailey), I've started to run the abridged perf test suite on this PR at 01789d3. You can monitor the build here. Update: The results are in! |
Heya Jake Bailey (@jakebailey), I've started to run the diff-based user code test suite on this PR at 01789d3. You can monitor the build here. Update: The results are in! |
Heya Jake Bailey (@jakebailey), I've started to run the parallelized Definitely Typed test suite on this PR at 01789d3. You can monitor the build here. |
TypeScript Bot (typescript-bot)
commented
Jul 15, 2022
Jake Bailey (@jakebailey) |
TypeScript Bot (typescript-bot)
commented
Jul 15, 2022
Jake Bailey (@jakebailey) Here they are:Comparison Report - main..49915
System
Hosts
Scenarios
Developer Information: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Wesley Wigham (weswigham)
left a comment
There was a problem hiding this comment.
Assuming the extended test suites are fine, these changes look good to me.
Jake Bailey (jakebailey)
commented
Jul 19, 2022
It was clean, yeah. |
| // Instantiate a generic signature in the context of a non-generic signature (section 3.8.5 in TypeScript spec) | ||
| function instantiateSignatureInContextOf(signature: Signature, contextualSignature: Signature, inferenceContext?: InferenceContext, compareTypes?: TypeComparer): Signature { | ||
| const context = createInferenceContext(signature.typeParameters!, signature, InferenceFlags.None, compareTypes); | ||
| const context = createInferenceContext(signature.typeParameters!, signature, inferenceContext?.flags ?? InferenceFlags.None, compareTypes); |
There was a problem hiding this comment.
Uh, I think this is cruft from my other PR. Will remove and retest.
Jake Bailey (jakebailey)
commented
Jul 19, 2022
TypeScript Bot (@typescript-bot) test this |
Heya Jake Bailey (@jakebailey), I've started to run the diff-based user code test suite on this PR at 4c5d4c1. You can monitor the build here. Update: The results are in! |
Heya Jake Bailey (@jakebailey), I've started to run the extended test suite on this PR at 4c5d4c1. You can monitor the build here. |
TypeScript Bot (typescript-bot)
commented
Jul 19, 2022
Jake Bailey (@jakebailey) |
These are some oddities and cleanups that I noticed in writing #49887 (see also #43962 (comment)).
Namely,
inferFromContravariantTypesonly did a contravariant inference ifstrictFunctionTypeswas set, but that function call was used in many places thatstrictFunctionTypesshould not be applied, like in the the alias type argument path that was the target of #49887.I can't think of any particular test case that would be affected by this (probably, people always have this flag on, though notably not our own repo, oops), but it feels wrong.