Type checking for logical NOT on BigInt
@@ -23736,6 +23736,14 @@ public final class TypeCheckTest extends TypeCheckTestCase {
"required: number"));
}
+ @Test
+ public void testBigIntOperators_logicalNot() {
+ compiler.getOptions().setLanguage(LanguageMode.UNSUPPORTED);
+ testTypes("const x = 1n; !x;");
+ testTypes("const x = BigInt(1); !x;");
+ testTypes("/** @type {bigint|string} */var x; !x;");
+ }
+
@Test
public void testBigIntValueOperators_unaryPlusIsForbidden() {
compiler.getOptions().setLanguage(LanguageMode.UNSUPPORTED);
