Repository navigation
Commit 24199e2
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 5592543 commit 24199e2
2 files changed
Lines changed: 91 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13932 | 13932 | | |
13933 | 13933 | | |
13934 | 13934 | | |
| 13935 | + | |
| 13936 | + | |
| 13937 | + | |
| 13938 | + | |
| 13939 | + | |
| 13940 | + | |
| 13941 | + | |
| 13942 | + | |
| 13943 | + | |
| 13944 | + | |
| 13945 | + | |
| 13946 | + | |
| 13947 | + | |
| 13948 | + | |
| 13949 | + | |
| 13950 | + | |
| 13951 | + | |
| 13952 | + | |
| 13953 | + | |
| 13954 | + | |
| 13955 | + | |
| 13956 | + | |
| 13957 | + | |
| 13958 | + | |
| 13959 | + | |
| 13960 | + | |
| 13961 | + | |
| 13962 | + | |
| 13963 | + | |
| 13964 | + | |
| 13965 | + | |
| 13966 | + | |
| 13967 | + | |
| 13968 | + | |
| 13969 | + | |
| 13970 | + | |
| 13971 | + | |
| 13972 | + | |
| 13973 | + | |
| 13974 | + | |
| 13975 | + | |
| 13976 | + | |
| 13977 | + | |
| 13978 | + | |
| 13979 | + | |
13935 | 13980 | | |
13936 | 13981 | | |
13937 | 13982 | | |
| |||
13946 | 13991 | | |
13947 | 13992 | | |
13948 | 13993 | | |
13949 | | - | |
13950 | | - | |
13951 | | - | |
13952 | | - | |
13953 | | - | |
13954 | | - | |
13955 | | - | |
13956 | | - | |
13957 | | - | |
13958 | | - | |
13959 | | - | |
13960 | | - | |
13961 | | - | |
13962 | | - | |
13963 | | - | |
13964 | | - | |
13965 | | - | |
13966 | | - | |
13967 | | - | |
13968 | | - | |
| 13994 | + | |
| 13995 | + | |
| 13996 | + | |
| 13997 | + | |
13969 | 13998 | | |
13970 | 13999 | | |
13971 | 14000 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
375 | 375 | | |
376 | 376 | | |
377 | 377 | | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
378 | 406 | | |
379 | 407 | | |
380 | 408 | | |
| |||
3361 | 3389 | | |
3362 | 3390 | | |
3363 | 3391 | | |
| 3392 | + | |
| 3393 | + | |
| 3394 | + | |
| 3395 | + | |
| 3396 | + | |
| 3397 | + | |
| 3398 | + | |
| 3399 | + | |
| 3400 | + | |
| 3401 | + | |
| 3402 | + | |
| 3403 | + | |
| 3404 | + | |
| 3405 | + | |
3364 | 3406 | | |
3365 | 3407 | | |
3366 | 3408 | | |
| |||
0 commit comments