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
Current the functions to doing binary operations don't check the types of either side. First a bit of background:
There are two functions for binary operators, they are split between
Mathematical and bitwise operations. Both sides have to be checked as there is no short circuiting behavior
Logical operators. These can have logical operators (and in the future the RHS can be narrowed for && operations)
in and instanceof operators are handled specially on Environment
There is a also a current option strict_casts (it should probably be renamed to no_implicit_casts) in TypeCheckOptions. When this is true should not allow operations like "hi" + 2.
These two functions are currently set up to return a Result. However both the logic for checking the sides and the diagnostic has not been implemented. For example
There are several things to carefully consider here
Still want to enable Symbol.toPrimative behaviour with hints and such (that will require these functions to have all the context to be able to do a call_type
This should disallowObject.toPrimative fall through as this result are not useful
The text was updated successfully, but these errors were encountered:
Current the functions to doing binary operations don't check the types of either side. First a bit of background:
There are two functions for binary operators, they are split between
in
andinstanceof
operators are handled specially onEnvironment
There is a also a current option
strict_casts
(it should probably be renamed tono_implicit_casts
) inTypeCheckOptions
. When this istrue
should not allow operations like"hi" + 2
.These two functions are currently set up to return a
Result
. However both the logic for checking the sides and the diagnostic has not been implemented. For exampleezno/checker/src/behavior/operations.rs
Lines 76 to 84 in 5021262
There are several things to carefully consider here
Symbol.toPrimative
behaviour with hints and such (that will require these functions to have all the context to be able to do acall_type
Object.toPrimative
fall through as this result are not usefulThe text was updated successfully, but these errors were encountered: