TypeScript icon indicating copy to clipboard operation
TypeScript copied to clipboard

fix(59236): fix parse error when using in nested in a for initializer

Open imhele opened this issue 1 year ago • 7 comments

Fixes #59236

https://github.com/babel/babel/blob/42cbc1c34264918b8072a5565f8599519351c8ff/packages/babel-parser/src/parser/expression.ts#L2752

imhele avatar Aug 25 '24 11:08 imhele

@imhele please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

@microsoft-github-policy-service agree

imhele avatar Aug 25 '24 11:08 imhele

@typescript-bot test it

jakebailey avatar Aug 26 '24 19:08 jakebailey

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
test top400 ✅ Started ✅ Results
user test this ✅ Started ✅ Results
run dt ✅ Started ✅ Results
perf test this faster ✅ Started 👀 Results

typescript-bot avatar Aug 26 '24 19:08 typescript-bot

Hey @jakebailey, the results of running the DT tests are ready.

Everything looks the same!

You can check the log here.

typescript-bot avatar Aug 26 '24 19:08 typescript-bot

@jakebailey Here are the results of running the user tests with tsc comparing main and refs/pull/59748/merge:

Everything looks good!

typescript-bot avatar Aug 26 '24 19:08 typescript-bot

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

Here they are:

tsc

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-Unions - node (v18.15.0, x64)
Errors 30 30 ~ ~ ~ p=1.000 n=6
Symbols 62,153 62,153 ~ ~ ~ p=1.000 n=6
Types 50,242 50,242 ~ ~ ~ p=1.000 n=6
Memory used 194,246k (± 0.99%) 193,567k (± 0.94%) ~ 192,377k 195,928k p=0.173 n=6
Parse Time 1.30s (± 0.93%) 1.30s (± 1.13%) ~ 1.28s 1.32s p=0.564 n=6
Bind Time 0.71s 0.71s ~ ~ ~ p=1.000 n=6
Check Time 9.57s (± 0.33%) 9.58s (± 0.36%) ~ 9.54s 9.63s p=0.936 n=6
Emit Time 2.72s (± 1.08%) 2.72s (± 0.55%) ~ 2.70s 2.74s p=1.000 n=6
Total Time 14.31s (± 0.44%) 14.31s (± 0.27%) ~ 14.24s 14.35s p=0.517 n=6
angular-1 - node (v18.15.0, x64)
Errors 7 7 ~ ~ ~ p=1.000 n=6
Symbols 945,753 945,753 ~ ~ ~ p=1.000 n=6
Types 410,067 410,067 ~ ~ ~ p=1.000 n=6
Memory used 1,222,735k (± 0.00%) 1,222,691k (± 0.00%) -44k (- 0.00%) 1,222,664k 1,222,727k p=0.031 n=6
Parse Time 6.63s (± 0.50%) 6.63s (± 0.49%) ~ 6.59s 6.67s p=0.462 n=6
Bind Time 1.86s (± 0.22%) 1.86s (± 0.44%) ~ 1.85s 1.87s p=0.584 n=6
Check Time 31.17s (± 0.56%) 31.19s (± 0.26%) ~ 31.08s 31.26s p=1.000 n=6
Emit Time 14.97s (± 0.15%) 14.96s (± 0.61%) ~ 14.80s 15.03s p=0.686 n=6
Total Time 54.63s (± 0.26%) 54.65s (± 0.23%) ~ 54.46s 54.81s p=0.810 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,532,459 2,532,459 ~ ~ ~ p=1.000 n=6
Types 996,223 996,223 ~ ~ ~ p=1.000 n=6
Memory used 2,460,207k (± 0.00%) 2,460,168k (± 0.00%) ~ 2,460,139k 2,460,187k p=0.173 n=6
Parse Time 9.46s (± 0.33%) 9.45s (± 0.19%) ~ 9.42s 9.47s p=0.466 n=6
Bind Time 2.24s (± 0.36%) 2.24s ~ ~ ~ p=0.405 n=6
Check Time 75.08s (± 0.54%) 75.20s (± 0.63%) ~ 74.40s 75.68s p=0.575 n=6
Emit Time 0.29s (± 2.93%) 0.28s (± 3.49%) ~ 0.27s 0.30s p=0.445 n=6
Total Time 87.07s (± 0.45%) 87.17s (± 0.56%) ~ 86.33s 87.66s p=0.575 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,232,179 1,232,180 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Types 264,629 264,630 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 2,354,384k (± 0.03%) 2,591,984k (±11.21%) ~ 2,354,355k 3,067,678k p=0.128 n=6
Parse Time 6.03s (± 0.50%) 6.05s (± 1.38%) ~ 5.95s 6.15s p=1.000 n=6
Bind Time 2.29s (± 1.23%) 2.26s (± 0.36%) -0.03s (- 1.31%) 2.25s 2.27s p=0.033 n=6
Check Time 41.14s (± 0.66%) 40.99s (± 0.85%) ~ 40.59s 41.46s p=0.378 n=6
Emit Time 4.02s (± 0.37%) 4.03s (± 0.93%) ~ 3.97s 4.07s p=0.520 n=6
Total Time 53.52s (± 0.54%) 53.32s (± 0.63%) ~ 52.87s 53.85s p=0.378 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,232,179 1,232,180 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Types 264,629 264,630 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 2,428,834k (± 0.02%) 2,429,037k (± 0.01%) ~ 2,428,694k 2,429,380k p=0.471 n=6
Parse Time 5.19s (± 0.82%) 5.17s (± 0.69%) ~ 5.14s 5.24s p=0.630 n=6
Bind Time 1.68s (± 0.69%) 1.68s (± 0.53%) ~ 1.67s 1.69s p=0.933 n=6
Check Time 35.24s (± 0.36%) 35.27s (± 0.16%) ~ 35.19s 35.34s p=0.521 n=6
Emit Time 3.42s (± 3.48%) 3.42s (± 2.67%) ~ 3.36s 3.60s p=0.471 n=6
Total Time 45.53s (± 0.27%) 45.54s (± 0.25%) ~ 45.42s 45.75s p=1.000 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 257,016 257,017 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Types 105,789 105,790 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 429,751k (± 0.03%) 429,721k (± 0.01%) ~ 429,658k 429,816k p=0.471 n=6
Parse Time 3.37s (± 0.72%) 3.36s (± 0.74%) ~ 3.33s 3.40s p=0.332 n=6
Bind Time 1.30s (± 0.65%) 1.30s (± 0.97%) ~ 1.29s 1.32s p=0.530 n=6
Check Time 18.15s (± 0.12%) 18.07s (± 0.53%) ~ 17.98s 18.24s p=0.065 n=6
Emit Time 1.65s (± 1.04%) 1.67s (± 1.95%) ~ 1.64s 1.71s p=0.567 n=6
Total Time 24.46s (± 0.21%) 24.40s (± 0.47%) ~ 24.27s 24.60s p=0.064 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 68 68 ~ ~ ~ p=1.000 n=6
Symbols 225,018 225,018 ~ ~ ~ p=1.000 n=6
Types 94,249 94,249 ~ ~ ~ p=1.000 n=6
Memory used 370,280k (± 0.04%) 370,220k (± 0.02%) ~ 370,171k 370,361k p=0.689 n=6
Parse Time 2.76s (± 0.58%) 2.76s (± 0.65%) ~ 2.73s 2.78s p=1.000 n=6
Bind Time 1.58s (± 0.69%) 1.58s (± 1.04%) ~ 1.56s 1.60s p=0.566 n=6
Check Time 15.80s (± 0.30%) 15.78s (± 0.19%) ~ 15.75s 15.83s p=0.571 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 20.14s (± 0.27%) 20.11s (± 0.21%) ~ 20.04s 20.17s p=0.334 n=6
vscode - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 3,021,191 3,021,191 ~ ~ ~ p=1.000 n=6
Types 1,039,494 1,039,494 ~ ~ ~ p=1.000 n=6
Memory used 3,141,840k (± 0.00%) 3,141,840k (± 0.00%) ~ 3,141,762k 3,141,937k p=1.000 n=6
Parse Time 17.26s (± 0.47%) 17.32s (± 0.28%) ~ 17.25s 17.37s p=0.296 n=6
Bind Time 5.22s (± 0.26%) 5.23s (± 0.50%) ~ 5.19s 5.26s p=0.332 n=6
Check Time 97.52s (± 0.61%) 97.25s (± 0.35%) ~ 96.60s 97.47s p=0.377 n=6
Emit Time 25.05s (± 0.58%) 25.11s (± 0.31%) ~ 24.97s 25.18s p=0.378 n=6
Total Time 145.04s (± 0.47%) 144.91s (± 0.22%) ~ 144.34s 145.26s p=1.000 n=6
webpack - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 275,311 275,311 ~ ~ ~ p=1.000 n=6
Types 112,431 112,431 ~ ~ ~ p=1.000 n=6
Memory used 424,222k (± 0.03%) 424,225k (± 0.01%) ~ 424,131k 424,311k p=1.000 n=6
Parse Time 3.96s (± 0.52%) 3.98s (± 0.35%) ~ 3.96s 4.00s p=0.252 n=6
Bind Time 1.74s (± 0.94%) 1.73s (± 1.06%) ~ 1.71s 1.75s p=0.685 n=6
Check Time 17.55s (± 0.24%) 17.51s (± 0.20%) ~ 17.46s 17.55s p=0.145 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 23.25s (± 0.22%) 23.22s (± 0.14%) ~ 23.17s 23.26s p=0.293 n=6
xstate-main - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 535,759 535,759 ~ ~ ~ p=1.000 n=6
Types 177,028 177,028 ~ ~ ~ p=1.000 n=6
Memory used 480,411k (± 0.01%) 480,441k (± 0.01%) ~ 480,333k 480,509k p=0.378 n=6
Parse Time 3.41s (± 0.36%) 3.40s (± 0.40%) ~ 3.38s 3.42s p=0.215 n=6
Bind Time 1.25s (± 0.60%) 1.25s (± 1.09%) ~ 1.22s 1.26s p=0.652 n=6
Check Time 18.12s (± 0.40%) 18.17s (± 0.29%) ~ 18.10s 18.24s p=0.171 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 22.78s (± 0.30%) 22.82s (± 0.19%) ~ 22.76s 22.86s p=0.332 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Compiler-Unions - node (v18.15.0, x64)
  • angular-1 - node (v18.15.0, x64)
  • mui-docs - node (v18.15.0, x64)
  • self-build-src - node (v18.15.0, x64)
  • self-build-src-public-api - node (v18.15.0, x64)
  • self-compiler - node (v18.15.0, x64)
  • ts-pre-modules - node (v18.15.0, x64)
  • vscode - node (v18.15.0, x64)
  • webpack - node (v18.15.0, x64)
  • xstate-main - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6
Developer Information:

Download Benchmarks

typescript-bot avatar Aug 26 '24 20:08 typescript-bot

@jakebailey Here are the results of running the top 400 repos with tsc comparing main and refs/pull/59748/merge:

Everything looks good!

typescript-bot avatar Aug 26 '24 20:08 typescript-bot