swc/crates/swc_ecma_minifier/tests/fixture
CPunisher 4436621564
fix(es/minifier): Check type of assignment target before merging assignments (#9617)
**Description:**

Collect types of vars, maybe other optimization could benefit from this:
`merged_var_type: Option<Value<Type>>`

When the variable is reassigned, the we merge the types with some simple
rules:
`None` + `None` = `None`
`None` + `Some(ty)` = `Some(ty)`
`Some(ty1)` + `Some(ty2)` if `ty1` == `ty2` = `Some(ty1)`
Otherwise = Unknown

**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/8718
2024-10-14 09:55:53 +09:00
..
check test(es/minfiier): Improve comment testing (#9164) 2024-07-06 22:53:57 +09:00
comparison test(es/minifier): Add tests for size (#5561) 2022-08-19 06:03:42 +00:00
issues fix(es/minifier): Check type of assignment target before merging assignments (#9617) 2024-10-14 09:55:53 +09:00
member_expr fix(es/minifier): Prevent removing side effects from accessing getter (#9530) 2024-09-04 12:28:46 +00:00
next fix(es/minifier): Check variable type while optimizing += (#9575) 2024-09-20 16:43:53 +09:00
no-side-effect test(es/minfiier): Improve comment testing (#9164) 2024-07-06 22:53:57 +09:00
pr fix(es/minifier): Don't remove exports (#7856) 2023-08-25 13:47:42 +09:00
projects test(es/minfiier): Improve comment testing (#9164) 2024-07-06 22:53:57 +09:00
reduced fix(es/minifier): Fix typescript enum detection (#9031) 2024-06-11 14:59:42 +09:00
simple test(es/minfiier): Improve comment testing (#9164) 2024-07-06 22:53:57 +09:00
terser fix(es/minifier): Remove wrong rule (#6201) 2022-10-19 02:14:38 +00:00