Repository navigation
Commit 35956eb
committed
fix(javascript): read a nested class's private names as its own when keeping a dropped class
A class nested in a dropped class's key that declares the same #name reads
its own, so the outer class was kept where terser drops it. The check now
reads such a class's body without the names it declares, and its extends
with all of them. Tests cover class expressions, private methods, getters,
setters, static methods and nested classes, one per branch the check takes.1 parent dcbc85f commit 35956eb
2 files changed
Lines changed: 91 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14706 | 14706 | | |
14707 | 14707 | | |
14708 | 14708 | | |
| 14709 | + | |
| 14710 | + | |
| 14711 | + | |
| 14712 | + | |
| 14713 | + | |
| 14714 | + | |
| 14715 | + | |
| 14716 | + | |
| 14717 | + | |
| 14718 | + | |
| 14719 | + | |
| 14720 | + | |
| 14721 | + | |
| 14722 | + | |
| 14723 | + | |
| 14724 | + | |
| 14725 | + | |
| 14726 | + | |
| 14727 | + | |
| 14728 | + | |
| 14729 | + | |
| 14730 | + | |
| 14731 | + | |
| 14732 | + | |
| 14733 | + | |
| 14734 | + | |
| 14735 | + | |
| 14736 | + | |
| 14737 | + | |
| 14738 | + | |
| 14739 | + | |
| 14740 | + | |
| 14741 | + | |
| 14742 | + | |
| 14743 | + | |
| 14744 | + | |
| 14745 | + | |
| 14746 | + | |
| 14747 | + | |
| 14748 | + | |
| 14749 | + | |
| 14750 | + | |
| 14751 | + | |
| 14752 | + | |
| 14753 | + | |
14709 | 14754 | | |
14710 | 14755 | | |
14711 | 14756 | | |
| |||
14720 | 14765 | | |
14721 | 14766 | | |
14722 | 14767 | | |
14723 | | - | |
14724 | | - | |
14725 | | - | |
14726 | | - | |
14727 | | - | |
14728 | | - | |
14729 | | - | |
14730 | | - | |
14731 | | - | |
14732 | | - | |
14733 | | - | |
14734 | | - | |
14735 | | - | |
14736 | | - | |
14737 | | - | |
14738 | | - | |
14739 | | - | |
14740 | | - | |
14741 | | - | |
14742 | | - | |
| 14768 | + | |
| 14769 | + | |
| 14770 | + | |
| 14771 | + | |
14743 | 14772 | | |
14744 | 14773 | | |
14745 | 14774 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
432 | 432 | | |
433 | 433 | | |
434 | 434 | | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
435 | 463 | | |
436 | 464 | | |
437 | 465 | | |
| |||
3480 | 3508 | | |
3481 | 3509 | | |
3482 | 3510 | | |
| 3511 | + | |
| 3512 | + | |
| 3513 | + | |
| 3514 | + | |
| 3515 | + | |
| 3516 | + | |
| 3517 | + | |
| 3518 | + | |
| 3519 | + | |
| 3520 | + | |
| 3521 | + | |
| 3522 | + | |
| 3523 | + | |
| 3524 | + | |
3483 | 3525 | | |
3484 | 3526 | | |
3485 | 3527 | | |
| |||
0 commit comments