mirror of
https://github.com/swc-project/swc.git
synced 2024-11-25 22:34:04 +03:00
4436621564
**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
164 B
164 B
swc_ecma_minifier | swc_ecma_utils | swc_ecma_usage_analyzer |
---|---|---|
patch | patch | patch |
fix(es/minifier): Check type of assignment target before merging assignments