stc
stc copied to clipboard
fix(ts/analyzer): Update normalize intersection condition about return never
Description:
let is_str = types.iter().any(|ty| ty.is_str());
let is_num = types.iter().any(|ty| ty.is_num());
let is_bool = types.iter().any(|ty| ty.is_bool());
let is_enum_variant = types.iter().any(|ty| ty.is_enum_variant());
if u32::from(is_str) + u32::from(is_num) + u32::from(is_bool) >= 2 {
return never!();
}
if u32::from(is_str) + u32::from(is_enum_variant) + u32::from(is_bool) >= 2 {
return never!();
}
number & SomeEnum
is possible, but string & SomeEnum
is impossible
Closes https://github.com/dudykr/stc/issues/174
but increase 2 extra_error; I'll be back after I fix it
and
made returnable errors.. ㅠㅠ
I think another PR would be also fine, if you prefer it
I'm happy. Because it's all over now.
Great, thank you!