[VM] Equality/inequality operators do not produce a constant expression if both arguments do not have the same type #1671
Labels
area-vm
Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
This issue was originally filed by [email protected]
Spec ch. 10.1:
An expression of one of the forms e1 == e2, e1 != e2, e1 === e2 or
e1! == e2 ,where e1 and e2 are constant expressions that evaluate to a
numeric, string or boolean value.
Doesn't say both expressions have to be the same type, but the following tests fail on VM:
initializer must be a compile time constant
final x3 = true != 1;
^
initializer must be a compile time constant
final x4 = "a" === false;
^
The text was updated successfully, but these errors were encountered: