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
There is no error when compiling with TypeScript. But when compiling with asc there is an error:
ERROR AS200: Conversion from type 'Point | null' to 'Point' requires an explicit cast.
let s1 = p !== null ? sum(p) : 0;
Ideally there would be no such errors since TypeScript can check that p is non-null at that location. This works for s0 so I would expect it to also work for s1.
The text was updated successfully, but these errors were encountered:
There is no error when compiling with TypeScript. But when compiling with
asc
there is an error:Ideally there would be no such errors since TypeScript can check that
p
is non-null at that location. This works fors0
so I would expect it to also work fors1
.The text was updated successfully, but these errors were encountered: