Fix uncalled function check usage detection for && expressions#49157
Fix uncalled function check usage detection for && expressions#49157andrewbranch merged 1 commit intomicrosoft:mainfrom
Conversation
|
@typescript-bot pack this |
|
Heya @DanielRosenwasser, I've started to run the diff-based community code test suite on this PR at 8d1095d. You can monitor the build here. |
|
Heya @DanielRosenwasser, I've started to run the tarball bundle task on this PR at 8d1095d. You can monitor the build here. |
|
Heya @DanielRosenwasser, I've started to run the parallelized Definitely Typed test suite on this PR at 8d1095d. You can monitor the build here. |
|
Heya @DanielRosenwasser, I've started to run the perf test suite on this PR at 8d1095d. You can monitor the build here. Update: The results are in! |
|
Heya @DanielRosenwasser, I've started to run the extended test suite on this PR at 8d1095d. You can monitor the build here. |
|
Hey @DanielRosenwasser, I've packed this into an installable tgz. You can install it for testing by referencing it in your and then running There is also a playground for this build and an npm module you can use via |
|
@DanielRosenwasser Here they are:Comparison Report - main..49157
System
Hosts
Scenarios
Developer Information: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@typescript-bot perf test faster |
|
Heya @DanielRosenwasser, I've started to run the abridged perf test suite on this PR at 8d1095d. You can monitor the build here. Update: The results are in! |
|
@DanielRosenwasser Here they are:Comparison Report - main..49157
System
Hosts
Scenarios
Developer Information: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@typescript-bot cherry-pick this to release-4.7 |
|
Heya @andrewbranch, I've started to run the task to cherry-pick this into |
|
Hey @andrewbranch, I've opened #49167 for you. |
Component commits: 8d1095d Fix uncalled function check usage detection for && expressions
| if (childSymbol && childSymbol === testedSymbol) { | ||
| // If the test was a simple identifier, the above check is sufficient | ||
| if (isIdentifier(expr)) { | ||
| if (isIdentifier(expr) || isIdentifier(testedNode) && isBinaryExpression(testedNode.parent)) { |
There was a problem hiding this comment.
What doesn't work if you just rewrite this as
| if (isIdentifier(expr) || isIdentifier(testedNode) && isBinaryExpression(testedNode.parent)) { | |
| if (isIdentifier(testedNode) && isBinaryExpression(testedNode.parent)) { |
There was a problem hiding this comment.
if (onChange) onChange()
Component commits: 8d1095d Fix uncalled function check usage detection for && expressions Co-authored-by: Andrew Branch <andrew@wheream.io>
Fixes #49155
I believe we didn't analyze this pattern for uncalled functions at all until #42835, and this case was just never tested.