Repository navigation
Do not reset control flow analysis on index signatures - #48427
Merged
Merged
Conversation
jihndai (jihndai)
force-pushed
the
issue48307
branch
from
March 25, 2022 21:59
81efd28 to
842f267
Compare
Nathan Shively-Sanders (sandersn)
requested review from
Jake Bailey (jakebailey) and
Wesley Wigham (weswigham)
April 4, 2022 21:58
Jake Bailey (jakebailey)
approved these changes
Apr 5, 2022
Member
|
TypeScript Bot (@typescript-bot) user test this inline |
Contributor
|
Heya Jake Bailey (@jakebailey), I've started to run the perf test suite on this PR at 842f267. You can monitor the build here. Update: The results are in! |
Contributor
|
Heya Jake Bailey (@jakebailey), I've started to run the diff-based community code test suite on this PR at 842f267. You can monitor the build here. Update: The results are in! |
Contributor
|
Jake Bailey (@jakebailey) |
Contributor
|
Jake Bailey (@jakebailey) Here they are:Comparison Report - main..48427
System
Hosts
Scenarios
Developer Information: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #48307
IndexSignaturenodes start a new control flow during binding, which leads to any narrowing done by previous control flow analysis to be lost for its children nodes. To avoid initializing a new control flow inIndexSignaturenodes, we stop associating theIsControlFlowContainerflag toIndexSignaturenodes, as there doesn't seem to be an active use case for this.Another change made along the way but is unrelated to the bug, was to disassociate the
IsFunctionLikeflag fromIndexSignaturenodes, as it didn't seem to be doing anything useful and seemed out of place. However, I'm not fully sure if this flag served a purpose here or not (as all the tests passed with or without it). If anyone knows whyIndexSignaturenodes were associated with theIsFunctionLikeflag, please feel free to update me on it.