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 is actually by design. Your var x is an implicit any variable that is tracked by control flow analysis (#11263). Because it hasn't been initialized, its control flow type in the 100 + x expression is undefined, and the + operator permits undefined as an operand value. If anything, we should discuss whether the numeric operators should be stricter with respect to undefined and null, but that's a different discussion.
From
master
as of right now (7b34b612beda66b0812462a3feeabc63852cd842
)Compile with
strictNullChecks
andnoImplicitAny
Expected: Some sort of error for using
x
.Actual: No error at all?
The text was updated successfully, but these errors were encountered: