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
{{ message }}
Repository navigation
[fix/type-checking] ternary operator incorrect type infer #3154
---@typestring|string[]localx=""-- TO BE xs: string[] -- AS IS xs: string[] | stringlocalxs=type(a) =="string" and {x} orxiftype(x) =="string" thenxs= {x}
elsexs=aend-- but xs:string[]
Activity
[-]ternary operator incorrect type infer[/-][+][fix/type-checking] ternary operator incorrect type infer[/+]tomlau10 commentedon Apr 14, 2025
I believe this is a duplicate of #2233, where the type narrow is not working correctly in ternary operator.