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
Function doesnt_work fails to compile because s is assumed to be number | null even though we just checked that s !== null.
π Expected behavior
This should either compile successfully or maybe produce an error/warning about unreachable code.
The expression s !== null ? s.toString() : "" was correct when used on its own but became invalid once I placed it in a false branch of a ternary operator, for no apparent reason.
The text was updated successfully, but these errors were encountered:
Bug Report
π Search Terms
π Version & Regression Information
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
Function
doesnt_work
fails to compile becauses
is assumed to benumber | null
even though we just checked thats !== null
.π Expected behavior
This should either compile successfully or maybe produce an error/warning about unreachable code.
The expression
s !== null ? s.toString() : ""
was correct when used on its own but became invalid once I placed it in afalse
branch of a ternary operator, for no apparent reason.The text was updated successfully, but these errors were encountered: