Skip to content
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

Fix uncalled function check usage detection for && expressions #49157

Merged
merged 1 commit into from
May 18, 2022

Conversation

andrewbranch
Copy link
Member

Fixes #49155

I believe we didn't analyze this pattern for uncalled functions at all until #42835, and this case was just never tested.

@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels May 18, 2022
@DanielRosenwasser
Copy link
Member

@typescript-bot pack this
@typescript-bot test this
@typescript-bot user test this inline
@typescript-bot run dt
@typescript-bot perf test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented May 18, 2022

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.

@typescript-bot
Copy link
Collaborator

typescript-bot commented May 18, 2022

Heya @DanielRosenwasser, I've started to run the tarball bundle task on this PR at 8d1095d. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented May 18, 2022

Heya @DanielRosenwasser, I've started to run the parallelized Definitely Typed test suite on this PR at 8d1095d. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented May 18, 2022

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!

@typescript-bot
Copy link
Collaborator

typescript-bot commented May 18, 2022

Heya @DanielRosenwasser, I've started to run the extended test suite on this PR at 8d1095d. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented May 18, 2022

Hey @DanielRosenwasser, I've packed this into an installable tgz. You can install it for testing by referencing it in your package.json like so:

{
    "devDependencies": {
        "typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/126482/artifacts?artifactName=tgz&fileId=98C3E34DB203E67D5D1DF141EC17A1CB6EEF8F3B43830B7CCEB00D40EA1EF46102&fileName=/typescript-4.8.0-insiders.20220518.tgz"
    }
}

and then running npm install.


There is also a playground for this build and an npm module you can use via "typescript": "npm:@typescript-deploys/[email protected]".;

@typescript-bot
Copy link
Collaborator

@DanielRosenwasser
The results of the perf run you requested are in!

Here they are:

Comparison Report - main..49157

Metric main 49157 Delta Best Worst
Angular - node (v10.16.3, x64)
Memory used 357,705k (± 0.03%) 357,664k (± 0.02%) -41k (- 0.01%) 357,547k 357,778k
Parse Time 2.07s (± 0.32%) 2.06s (± 0.23%) -0.00s (- 0.19%) 2.05s 2.07s
Bind Time 0.86s (± 0.77%) 0.86s (± 0.81%) -0.00s (- 0.23%) 0.85s 0.88s
Check Time 5.83s (± 0.53%) 5.84s (± 0.37%) +0.01s (+ 0.09%) 5.79s 5.88s
Emit Time 6.00s (± 0.21%) 6.00s (± 0.38%) -0.00s (- 0.02%) 5.95s 6.05s
Total Time 14.77s (± 0.27%) 14.77s (± 0.30%) -0.00s (- 0.01%) 14.66s 14.85s
Compiler-Unions - node (v10.16.3, x64)
Memory used 206,010k (± 0.02%) 205,966k (± 0.04%) -44k (- 0.02%) 205,801k 206,116k
Parse Time 0.84s (± 0.62%) 0.84s (± 0.87%) -0.00s (- 0.36%) 0.82s 0.85s
Bind Time 0.51s (± 1.02%) 0.52s (± 0.90%) +0.01s (+ 1.76%) 0.51s 0.53s
Check Time 7.92s (± 0.17%) 7.92s (± 0.69%) +0.00s (+ 0.03%) 7.78s 8.01s
Emit Time 2.50s (± 0.94%) 2.49s (± 0.62%) -0.01s (- 0.44%) 2.47s 2.53s
Total Time 11.78s (± 0.26%) 11.77s (± 0.54%) -0.00s (- 0.04%) 11.61s 11.92s
Monaco - node (v10.16.3, x64)
Memory used 343,841k (± 0.02%) 343,809k (± 0.03%) -32k (- 0.01%) 343,589k 344,108k
Parse Time 1.59s (± 0.58%) 1.58s (± 0.41%) -0.01s (- 0.63%) 1.57s 1.60s
Bind Time 0.75s (± 0.48%) 0.76s (± 0.65%) +0.00s (+ 0.27%) 0.75s 0.77s
Check Time 5.81s (± 0.42%) 5.83s (± 0.52%) +0.02s (+ 0.28%) 5.76s 5.92s
Emit Time 3.25s (± 0.89%) 3.23s (± 0.66%) -0.02s (- 0.62%) 3.19s 3.27s
Total Time 11.41s (± 0.46%) 11.40s (± 0.29%) -0.02s (- 0.13%) 11.36s 11.52s
TFS - node (v10.16.3, x64)
Memory used 305,496k (± 0.02%) 305,507k (± 0.01%) +12k (+ 0.00%) 305,441k 305,595k
Parse Time 1.29s (± 0.63%) 1.30s (± 0.51%) +0.01s (+ 0.77%) 1.29s 1.32s
Bind Time 0.72s (± 0.51%) 0.71s (± 0.48%) -0.00s (- 0.42%) 0.71s 0.72s
Check Time 5.24s (± 0.46%) 5.27s (± 0.41%) +0.03s (+ 0.51%) 5.24s 5.32s
Emit Time 3.42s (± 1.11%) 3.43s (± 0.55%) +0.01s (+ 0.29%) 3.39s 3.47s
Total Time 10.67s (± 0.55%) 10.71s (± 0.29%) +0.04s (+ 0.38%) 10.65s 10.79s
material-ui - node (v10.16.3, x64)
Memory used 468,492k (± 0.01%) 468,591k (± 0.01%) +99k (+ 0.02%) 468,483k 468,704k
Parse Time 1.83s (± 0.60%) 1.83s (± 0.30%) 0.00s ( 0.00%) 1.82s 1.84s
Bind Time 0.67s (± 1.49%) 0.68s (± 1.30%) +0.00s (+ 0.45%) 0.66s 0.70s
Check Time 14.29s (± 0.37%) 14.37s (± 0.43%) +0.07s (+ 0.52%) 14.23s 14.52s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 16.80s (± 0.32%) 16.88s (± 0.37%) +0.08s (+ 0.47%) 16.73s 17.03s
xstate - node (v10.16.3, x64)
Memory used 575,305k (± 1.31%) 571,856k (± 0.01%) -3,449k (- 0.60%) 571,613k 572,057k
Parse Time 2.58s (± 0.14%) 2.59s (± 0.25%) +0.00s (+ 0.15%) 2.58s 2.60s
Bind Time 1.01s (± 0.49%) 1.01s (± 0.58%) +0.00s (+ 0.10%) 1.00s 1.02s
Check Time 1.53s (± 0.87%) 1.53s (± 0.55%) +0.00s (+ 0.26%) 1.51s 1.55s
Emit Time 0.07s (± 0.00%) 0.07s (± 0.00%) 0.00s ( 0.00%) 0.07s 0.07s
Total Time 5.19s (± 0.36%) 5.20s (± 0.25%) +0.01s (+ 0.19%) 5.17s 5.23s
Angular - node (v12.1.0, x64)
Memory used 335,407k (± 0.02%) 335,383k (± 0.01%) -25k (- 0.01%) 335,301k 335,482k
Parse Time 2.07s (± 0.60%) 2.06s (± 0.68%) -0.01s (- 0.34%) 2.03s 2.09s
Bind Time 0.82s (± 0.68%) 0.83s (± 0.54%) +0.01s (+ 0.73%) 0.82s 0.84s
Check Time 5.63s (± 0.37%) 5.64s (± 0.44%) +0.02s (+ 0.28%) 5.59s 5.70s
Emit Time 6.25s (± 0.74%) 6.22s (± 0.46%) -0.03s (- 0.54%) 6.13s 6.26s
Total Time 14.77s (± 0.35%) 14.74s (± 0.36%) -0.02s (- 0.16%) 14.65s 14.87s
Compiler-Unions - node (v12.1.0, x64)
Memory used 193,424k (± 0.15%) 193,615k (± 0.03%) +191k (+ 0.10%) 193,479k 193,725k
Parse Time 0.83s (± 1.09%) 0.83s (± 0.78%) +0.00s (+ 0.36%) 0.82s 0.85s
Bind Time 0.53s (± 0.94%) 0.53s (± 0.89%) +0.00s (+ 0.76%) 0.52s 0.54s
Check Time 7.45s (± 0.76%) 7.43s (± 0.46%) -0.02s (- 0.21%) 7.38s 7.55s
Emit Time 2.54s (± 0.78%) 2.52s (± 0.85%) -0.02s (- 0.75%) 2.48s 2.57s
Total Time 11.34s (± 0.65%) 11.31s (± 0.40%) -0.02s (- 0.22%) 11.24s 11.44s
Monaco - node (v12.1.0, x64)
Memory used 326,855k (± 0.02%) 326,873k (± 0.02%) +18k (+ 0.01%) 326,699k 327,033k
Parse Time 1.56s (± 0.65%) 1.55s (± 0.77%) -0.01s (- 0.70%) 1.53s 1.59s
Bind Time 0.74s (± 0.65%) 0.74s (± 0.83%) +0.00s (+ 0.54%) 0.73s 0.76s
Check Time 5.63s (± 0.42%) 5.67s (± 0.57%) +0.04s (+ 0.64%) 5.60s 5.74s
Emit Time 3.27s (± 0.28%) 3.28s (± 1.42%) +0.01s (+ 0.34%) 3.22s 3.40s
Total Time 11.20s (± 0.25%) 11.24s (± 0.54%) +0.04s (+ 0.36%) 11.12s 11.36s
TFS - node (v12.1.0, x64)
Memory used 290,167k (± 0.02%) 290,164k (± 0.02%) -3k (- 0.00%) 290,038k 290,302k
Parse Time 1.29s (± 0.69%) 1.29s (± 0.77%) -0.00s (- 0.15%) 1.27s 1.32s
Bind Time 0.72s (± 0.82%) 0.73s (± 0.64%) +0.01s (+ 0.83%) 0.72s 0.74s
Check Time 5.22s (± 0.49%) 5.22s (± 0.50%) -0.00s (- 0.06%) 5.16s 5.28s
Emit Time 3.50s (± 0.56%) 3.49s (± 1.02%) -0.01s (- 0.14%) 3.41s 3.57s
Total Time 10.74s (± 0.41%) 10.73s (± 0.54%) -0.00s (- 0.05%) 10.59s 10.90s
material-ui - node (v12.1.0, x64)
Memory used 447,550k (± 0.02%) 447,412k (± 0.06%) -139k (- 0.03%) 446,361k 447,666k
Parse Time 1.83s (± 0.41%) 1.84s (± 0.69%) +0.01s (+ 0.71%) 1.81s 1.86s
Bind Time 0.65s (± 0.80%) 0.65s (± 0.51%) -0.00s (- 0.15%) 0.64s 0.66s
Check Time 12.88s (± 0.32%) 12.96s (± 0.61%) +0.07s (+ 0.57%) 12.85s 13.15s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 15.36s (± 0.28%) 15.45s (± 0.54%) +0.09s (+ 0.57%) 15.32s 15.67s
xstate - node (v12.1.0, x64)
Memory used 537,510k (± 0.02%) 537,546k (± 0.02%) +36k (+ 0.01%) 537,342k 537,787k
Parse Time 2.53s (± 0.36%) 2.54s (± 0.43%) +0.01s (+ 0.51%) 2.52s 2.57s
Bind Time 1.02s (± 1.04%) 1.02s (± 1.03%) -0.00s (- 0.20%) 1.00s 1.04s
Check Time 1.47s (± 0.53%) 1.48s (± 0.67%) +0.01s (+ 0.48%) 1.46s 1.51s
Emit Time 0.07s (± 0.00%) 0.07s (± 0.00%) 0.00s ( 0.00%) 0.07s 0.07s
Total Time 5.10s (± 0.36%) 5.11s (± 0.48%) +0.01s (+ 0.29%) 5.07s 5.17s
Angular - node (v14.15.1, x64)
Memory used 333,635k (± 0.01%) 333,610k (± 0.01%) -25k (- 0.01%) 333,548k 333,694k
Parse Time 2.04s (± 0.39%) 2.04s (± 0.82%) +0.01s (+ 0.34%) 2.02s 2.10s
Bind Time 0.87s (± 1.01%) 0.87s (± 0.66%) -0.00s (- 0.34%) 0.86s 0.88s
Check Time 5.63s (± 0.57%) 5.63s (± 0.45%) +0.00s (+ 0.05%) 5.57s 5.69s
Emit Time 6.30s (± 0.55%) 6.31s (± 0.92%) +0.01s (+ 0.21%) 6.21s 6.46s
Total Time 14.84s (± 0.35%) 14.86s (± 0.45%) +0.02s (+ 0.12%) 14.76s 15.06s
Compiler-Unions - node (v14.15.1, x64)
Memory used 192,268k (± 0.02%) 192,170k (± 0.12%) -98k (- 0.05%) 191,237k 192,355k
Parse Time 0.85s (± 0.56%) 0.84s (± 0.59%) -0.00s (- 0.24%) 0.84s 0.86s
Bind Time 0.56s (± 0.59%) 0.56s (± 0.53%) -0.00s (- 0.36%) 0.55s 0.56s
Check Time 7.52s (± 0.39%) 7.57s (± 0.57%) +0.05s (+ 0.70%) 7.51s 7.69s
Emit Time 2.51s (± 0.47%) 2.50s (± 0.60%) -0.00s (- 0.16%) 2.46s 2.54s
Total Time 11.43s (± 0.26%) 11.48s (± 0.40%) +0.04s (+ 0.38%) 11.37s 11.59s
Monaco - node (v14.15.1, x64)
Memory used 325,634k (± 0.01%) 325,630k (± 0.01%) -4k (- 0.00%) 325,561k 325,676k
Parse Time 1.57s (± 0.84%) 1.57s (± 0.74%) +0.01s (+ 0.38%) 1.55s 1.60s
Bind Time 0.78s (± 1.34%) 0.78s (± 0.71%) -0.00s (- 0.00%) 0.77s 0.79s
Check Time 5.53s (± 0.29%) 5.55s (± 0.44%) +0.02s (+ 0.43%) 5.51s 5.60s
Emit Time 3.33s (± 0.71%) 3.36s (± 0.82%) +0.03s (+ 0.75%) 3.30s 3.43s
Total Time 11.20s (± 0.35%) 11.26s (± 0.36%) +0.06s (+ 0.50%) 11.15s 11.32s
TFS - node (v14.15.1, x64)
Memory used 289,138k (± 0.01%) 289,126k (± 0.01%) -12k (- 0.00%) 289,094k 289,179k
Parse Time 1.36s (± 1.73%) 1.37s (± 1.12%) +0.00s (+ 0.07%) 1.34s 1.40s
Bind Time 0.72s (± 1.05%) 0.72s (± 0.50%) 0.00s ( 0.00%) 0.72s 0.73s
Check Time 5.22s (± 0.47%) 5.20s (± 0.41%) -0.01s (- 0.25%) 5.16s 5.25s
Emit Time 3.59s (± 1.20%) 3.52s (± 2.15%) -0.06s (- 1.78%) 3.36s 3.64s
Total Time 10.89s (± 0.46%) 10.82s (± 0.64%) -0.08s (- 0.71%) 10.64s 10.96s
material-ui - node (v14.15.1, x64)
Memory used 445,756k (± 0.01%) 445,523k (± 0.08%) -233k (- 0.05%) 444,556k 445,795k
Parse Time 1.86s (± 0.41%) 1.88s (± 0.48%) +0.01s (+ 0.59%) 1.86s 1.90s
Bind Time 0.70s (± 0.53%) 0.70s (± 0.67%) +0.00s (+ 0.72%) 0.69s 0.71s
Check Time 13.03s (± 0.71%) 13.17s (± 0.81%) +0.14s (+ 1.06%) 12.94s 13.40s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 15.59s (± 0.60%) 15.74s (± 0.66%) +0.15s (+ 0.97%) 15.52s 15.97s
xstate - node (v14.15.1, x64)
Memory used 535,264k (± 0.00%) 535,237k (± 0.00%) -27k (- 0.01%) 535,198k 535,290k
Parse Time 2.58s (± 0.51%) 2.59s (± 0.41%) +0.01s (+ 0.43%) 2.57s 2.62s
Bind Time 1.15s (± 0.87%) 1.15s (± 0.70%) +0.00s (+ 0.09%) 1.13s 1.17s
Check Time 1.52s (± 0.55%) 1.52s (± 0.37%) +0.01s (+ 0.40%) 1.51s 1.54s
Emit Time 0.07s (± 0.00%) 0.07s (± 0.00%) 0.00s ( 0.00%) 0.07s 0.07s
Total Time 5.32s (± 0.21%) 5.34s (± 0.23%) +0.01s (+ 0.26%) 5.32s 5.37s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-210-generic
Architecturex64
Available Memory16 GB
Available Memory1 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v10.16.3, x64)
  • node (v12.1.0, x64)
  • node (v14.15.1, x64)
Scenarios
  • Angular - node (v10.16.3, x64)
  • Angular - node (v12.1.0, x64)
  • Angular - node (v14.15.1, x64)
  • Compiler-Unions - node (v10.16.3, x64)
  • Compiler-Unions - node (v12.1.0, x64)
  • Compiler-Unions - node (v14.15.1, x64)
  • Monaco - node (v10.16.3, x64)
  • Monaco - node (v12.1.0, x64)
  • Monaco - node (v14.15.1, x64)
  • TFS - node (v10.16.3, x64)
  • TFS - node (v12.1.0, x64)
  • TFS - node (v14.15.1, x64)
  • material-ui - node (v10.16.3, x64)
  • material-ui - node (v12.1.0, x64)
  • material-ui - node (v14.15.1, x64)
  • xstate - node (v10.16.3, x64)
  • xstate - node (v12.1.0, x64)
  • xstate - node (v14.15.1, x64)
Benchmark Name Iterations
Current 49157 10
Baseline main 10

Developer Information:

Download Benchmark

@DanielRosenwasser
Copy link
Member

@typescript-bot perf test faster

@typescript-bot
Copy link
Collaborator

typescript-bot commented May 18, 2022

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!

@typescript-bot
Copy link
Collaborator

@DanielRosenwasser
The results of the perf run you requested are in!

Here they are:

Comparison Report - main..49157

Metric main 49157 Delta Best Worst
Angular - node (v14.15.1, x64)
Memory used 333,635k (± 0.01%) 333,626k (± 0.01%) -10k (- 0.00%) 333,581k 333,673k
Parse Time 2.04s (± 0.39%) 2.04s (± 0.51%) +0.00s (+ 0.20%) 2.02s 2.06s
Bind Time 0.87s (± 1.01%) 0.88s (± 1.15%) +0.00s (+ 0.23%) 0.86s 0.91s
Check Time 5.63s (± 0.57%) 5.61s (± 0.47%) -0.02s (- 0.37%) 5.56s 5.68s
Emit Time 6.30s (± 0.55%) 6.28s (± 0.59%) -0.02s (- 0.32%) 6.20s 6.39s
Total Time 14.84s (± 0.35%) 14.80s (± 0.36%) -0.04s (- 0.25%) 14.71s 14.98s
Compiler-Unions - node (v14.15.1, x64)
Memory used 192,268k (± 0.02%) 192,930k (± 0.50%) +663k (+ 0.34%) 192,201k 195,565k
Parse Time 0.85s (± 0.56%) 0.85s (± 0.76%) +0.00s (+ 0.59%) 0.84s 0.87s
Bind Time 0.56s (± 0.59%) 0.56s (± 1.00%) -0.00s (- 0.36%) 0.55s 0.57s
Check Time 7.52s (± 0.39%) 7.55s (± 0.64%) +0.03s (+ 0.44%) 7.48s 7.70s
Emit Time 2.51s (± 0.47%) 2.50s (± 0.56%) -0.01s (- 0.40%) 2.47s 2.53s
Total Time 11.43s (± 0.26%) 11.46s (± 0.37%) +0.03s (+ 0.24%) 11.40s 11.60s
Monaco - node (v14.15.1, x64)
Memory used 325,634k (± 0.01%) 325,629k (± 0.01%) -5k (- 0.00%) 325,590k 325,661k
Parse Time 1.57s (± 0.84%) 1.57s (± 0.80%) +0.01s (+ 0.38%) 1.56s 1.61s
Bind Time 0.78s (± 1.34%) 0.77s (± 0.72%) -0.01s (- 0.77%) 0.76s 0.78s
Check Time 5.53s (± 0.29%) 5.54s (± 0.47%) +0.02s (+ 0.34%) 5.49s 5.60s
Emit Time 3.33s (± 0.71%) 3.34s (± 0.82%) +0.01s (+ 0.27%) 3.30s 3.42s
Total Time 11.20s (± 0.35%) 11.24s (± 0.37%) +0.03s (+ 0.29%) 11.15s 11.34s
TFS - node (v14.15.1, x64)
Memory used 289,138k (± 0.01%) 289,119k (± 0.01%) -19k (- 0.01%) 289,072k 289,175k
Parse Time 1.36s (± 1.73%) 1.34s (± 1.05%) -0.02s (- 1.39%) 1.30s 1.38s
Bind Time 0.72s (± 1.05%) 0.73s (± 1.06%) +0.01s (+ 0.69%) 0.71s 0.74s
Check Time 5.22s (± 0.47%) 5.21s (± 0.33%) -0.00s (- 0.08%) 5.17s 5.25s
Emit Time 3.59s (± 1.20%) 3.50s (± 2.14%) -0.09s (- 2.56%) 3.39s 3.65s
Total Time 10.89s (± 0.46%) 10.78s (± 0.71%) -0.11s (- 1.02%) 10.66s 10.97s
material-ui - node (v14.15.1, x64)
Memory used 445,756k (± 0.01%) 445,741k (± 0.00%) -15k (- 0.00%) 445,699k 445,769k
Parse Time 1.86s (± 0.41%) 1.87s (± 0.46%) +0.01s (+ 0.38%) 1.86s 1.89s
Bind Time 0.70s (± 0.53%) 0.70s (± 0.68%) +0.00s (+ 0.29%) 0.69s 0.71s
Check Time 13.03s (± 0.71%) 13.05s (± 0.41%) +0.02s (+ 0.13%) 12.97s 13.16s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 15.59s (± 0.60%) 15.62s (± 0.34%) +0.03s (+ 0.16%) 15.53s 15.73s
xstate - node (v14.15.1, x64)
Memory used 535,264k (± 0.00%) 535,235k (± 0.00%) -29k (- 0.01%) 535,199k 535,304k
Parse Time 2.58s (± 0.51%) 2.58s (± 0.36%) -0.00s (- 0.04%) 2.56s 2.60s
Bind Time 1.15s (± 0.87%) 1.14s (± 0.42%) -0.00s (- 0.35%) 1.13s 1.15s
Check Time 1.52s (± 0.55%) 1.53s (± 0.54%) +0.01s (+ 0.66%) 1.51s 1.55s
Emit Time 0.07s (± 0.00%) 0.07s (± 0.00%) 0.00s ( 0.00%) 0.07s 0.07s
Total Time 5.32s (± 0.21%) 5.32s (± 0.25%) +0.00s (+ 0.02%) 5.29s 5.36s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-210-generic
Architecturex64
Available Memory16 GB
Available Memory1 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v14.15.1, x64)
Scenarios
  • Angular - node (v14.15.1, x64)
  • Compiler-Unions - node (v14.15.1, x64)
  • Monaco - node (v14.15.1, x64)
  • TFS - node (v14.15.1, x64)
  • material-ui - node (v14.15.1, x64)
  • xstate - node (v14.15.1, x64)
Benchmark Name Iterations
Current 49157 10
Baseline main 10

Developer Information:

Download Benchmark

@andrewbranch
Copy link
Member Author

@typescript-bot cherry-pick this to release-4.7

@typescript-bot
Copy link
Collaborator

typescript-bot commented May 18, 2022

Heya @andrewbranch, I've started to run the task to cherry-pick this into release-4.7 on this PR at 8d1095d. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

Hey @andrewbranch, I've opened #49167 for you.

typescript-bot pushed a commit to typescript-bot/TypeScript that referenced this pull request May 18, 2022
Component commits:
8d1095d Fix uncalled function check usage detection for && expressions
@@ -38001,7 +38001,7 @@ namespace ts {
const childSymbol = getSymbolAtLocation(childNode);
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)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What doesn't work if you just rewrite this as

Suggested change
if (isIdentifier(expr) || isIdentifier(testedNode) && isBinaryExpression(testedNode.parent)) {
if (isIdentifier(testedNode) && isBinaryExpression(testedNode.parent)) {

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (onChange) onChange()

@andrewbranch andrewbranch merged commit e56a067 into microsoft:main May 18, 2022
@andrewbranch andrewbranch deleted the bug/49155 branch May 18, 2022 20:58
andrewbranch added a commit that referenced this pull request May 18, 2022
Component commits:
8d1095d Fix uncalled function check usage detection for && expressions

Co-authored-by: Andrew Branch <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Milestone Bug PRs that fix a bug with a specific milestone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Uncalled function in binary expression not silenced by body usage
4 participants