Type inferencing for logical NOT on BigInt
@@ -1114,6 +1114,19 @@ public final class TypeInferenceTest {
verify("enumElementUnionType", NO_TYPE);
}
+ @Test
+ public void testBigIntWithLogicalNOT() {
+ assuming("x", BIGINT_TYPE);
+ assuming("y", BIGINT_OBJECT_TYPE);
+ assuming("z", createUnionType(BIGINT_TYPE, NUMBER_TYPE));
+
+ inFunction("valueType = !x; objectType = !y; unionType = !z;");
+
+ verify("valueType", BOOLEAN_TYPE);
+ verify("objectType", BOOLEAN_TYPE);
+ verify("unionType", BOOLEAN_TYPE);
+ }
+
@Test
public void testBigIntWithUnaryMinus() {
assuming("x", BIGINT_TYPE);
