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
In the meantime we can probably just create a union of all possible types, however I'm not sure how useful that is.
I believe a union of possible types would be very very useful, because in a lot of cases the choices are really not too many, and control flow down the road may start restricting them.
For example:
let a = 1;// a is intif condition {
a = true;// a is bool}// a is int | booldo_something(a);// only do_something(int) or do_something(bool) matchiftype_of(a) == "int"{// a is int here}else{// a is bool here, essentially (int | bool) - int}
Right now assignments do not do anything to the type of the variable:
On a straight assignment to a lone variable, that variable should take on the type of the expression.
The text was updated successfully, but these errors were encountered: