You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This can only be solved when nil is handled separately from other types. If we can guarantee that cv.string is a non-nil string, then we'd know for a fact that all types other than nil and boolean are always truthy, and then we could propagate the inference confidently.
hishamhm
changed the title
union type does not specialize with and-or idiom
[nil] union type does not specialize with and-or idiom
Sep 2, 2024
Local variables are not being inferred to
string
, even though both sides of the and-or "ternary" resolve to string.The text was updated successfully, but these errors were encountered: