Commit 29dffc3
authored
Forbid unused property renaming in destructuring binding in function types (#41044)
* Forbid renaming a propertyin function type parameters
* add tests
* Remove renaming from declaration output
* accept baseline
* accept baseline
* renew tests (not very right now)
* get correct result
* update diagnostic text
* accept baseline
* add declaration emit test
* fix declaration emit
* fix formatting
* revert unnecessary change
* accept baseline
* extend tests
* Revert "revert unnecessary change"
This reverts commit 17a29ff.
* accept baseline
* Rename and refactor potentialAlways... stuff
* add non-identifier names
* extend check to non-identifier original property names
* update diagnostic message
* add related span
* accept baseline
* add symbol-keyed test case
* oops?
* workaround for unstable test
* fix suggested name
* add comment about non-identifier property names
* simplify isReferenced check
* accept baseline
* move it one step further1 parent dbab6eb commit 29dffc3
File tree
41 files changed
+1691
-73
lines changed- src/compiler
- transformers
- tests
- baselines/reference
- cases/compiler
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
41 files changed
+1691
-73
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1015 | 1015 | | |
1016 | 1016 | | |
1017 | 1017 | | |
| 1018 | + | |
1018 | 1019 | | |
1019 | 1020 | | |
1020 | 1021 | | |
| |||
5945 | 5946 | | |
5946 | 5947 | | |
5947 | 5948 | | |
5948 | | - | |
5949 | | - | |
| 5949 | + | |
| 5950 | + | |
5950 | 5951 | | |
5951 | 5952 | | |
5952 | 5953 | | |
5953 | | - | |
| 5954 | + | |
5954 | 5955 | | |
5955 | | - | |
5956 | | - | |
5957 | | - | |
5958 | | - | |
5959 | | - | |
5960 | | - | |
| 5956 | + | |
| 5957 | + | |
| 5958 | + | |
| 5959 | + | |
| 5960 | + | |
| 5961 | + | |
| 5962 | + | |
| 5963 | + | |
| 5964 | + | |
| 5965 | + | |
| 5966 | + | |
| 5967 | + | |
| 5968 | + | |
| 5969 | + | |
| 5970 | + | |
| 5971 | + | |
5961 | 5972 | | |
5962 | 5973 | | |
5963 | 5974 | | |
| |||
37432 | 37443 | | |
37433 | 37444 | | |
37434 | 37445 | | |
| 37446 | + | |
| 37447 | + | |
| 37448 | + | |
| 37449 | + | |
| 37450 | + | |
| 37451 | + | |
| 37452 | + | |
| 37453 | + | |
| 37454 | + | |
| 37455 | + | |
| 37456 | + | |
| 37457 | + | |
| 37458 | + | |
| 37459 | + | |
| 37460 | + | |
| 37461 | + | |
| 37462 | + | |
| 37463 | + | |
37435 | 37464 | | |
37436 | 37465 | | |
37437 | 37466 | | |
| |||
37773 | 37802 | | |
37774 | 37803 | | |
37775 | 37804 | | |
| 37805 | + | |
| 37806 | + | |
| 37807 | + | |
| 37808 | + | |
| 37809 | + | |
| 37810 | + | |
| 37811 | + | |
| 37812 | + | |
| 37813 | + | |
| 37814 | + | |
| 37815 | + | |
| 37816 | + | |
| 37817 | + | |
37776 | 37818 | | |
37777 | 37819 | | |
37778 | 37820 | | |
| |||
41617 | 41659 | | |
41618 | 41660 | | |
41619 | 41661 | | |
| 41662 | + | |
41620 | 41663 | | |
41621 | 41664 | | |
41622 | 41665 | | |
| |||
41636 | 41679 | | |
41637 | 41680 | | |
41638 | 41681 | | |
| 41682 | + | |
| 41683 | + | |
| 41684 | + | |
41639 | 41685 | | |
41640 | 41686 | | |
41641 | 41687 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3487 | 3487 | | |
3488 | 3488 | | |
3489 | 3489 | | |
| 3490 | + | |
| 3491 | + | |
| 3492 | + | |
| 3493 | + | |
| 3494 | + | |
| 3495 | + | |
| 3496 | + | |
| 3497 | + | |
3490 | 3498 | | |
3491 | 3499 | | |
3492 | 3500 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
453 | 453 | | |
454 | 454 | | |
455 | 455 | | |
456 | | - | |
| 456 | + | |
457 | 457 | | |
458 | 458 | | |
459 | 459 | | |
| |||
471 | 471 | | |
472 | 472 | | |
473 | 473 | | |
474 | | - | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
475 | 491 | | |
476 | 492 | | |
477 | 493 | | |
| |||
485 | 501 | | |
486 | 502 | | |
487 | 503 | | |
488 | | - | |
| 504 | + | |
489 | 505 | | |
490 | 506 | | |
491 | 507 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
417 | 417 | | |
418 | 418 | | |
419 | 419 | | |
420 | | - | |
| 420 | + | |
421 | 421 | | |
422 | 422 | | |
423 | 423 | | |
| |||
438 | 438 | | |
439 | 439 | | |
440 | 440 | | |
441 | | - | |
| 441 | + | |
442 | 442 | | |
443 | 443 | | |
444 | 444 | | |
| |||
451 | 451 | | |
452 | 452 | | |
453 | 453 | | |
454 | | - | |
| 454 | + | |
455 | 455 | | |
456 | 456 | | |
457 | 457 | | |
| |||
462 | 462 | | |
463 | 463 | | |
464 | 464 | | |
465 | | - | |
| 465 | + | |
466 | 466 | | |
467 | 467 | | |
468 | 468 | | |
| |||
Lines changed: 32 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
0 commit comments