swc/crates/swc_ecma_usage_analyzer
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
..
src fix(es/minifier): Check type of assignment target before merging assignments (#9617) 2024-10-14 09:55:53 +09:00
Cargo.toml chore: Publish crates with swc_core v1.0.0 2024-10-12 16:20:07 +09:00