mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
28 lines
608 B
TypeScript
28 lines
608 B
TypeScript
//// [tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorInvalidOperations.ts] ////
|
|
|
|
//// [bitwiseNotOperatorInvalidOperations.ts]
|
|
// Unary operator ~
|
|
var q;
|
|
|
|
// operand before ~
|
|
var a = q~; //expect error
|
|
|
|
// multiple operands after ~
|
|
var mul = ~[1, 2, "abc"], ""; //expect error
|
|
|
|
// miss an operand
|
|
var b =~;
|
|
|
|
//// [bitwiseNotOperatorInvalidOperations.js]
|
|
"use strict";
|
|
// Unary operator ~
|
|
var q;
|
|
// operand before ~
|
|
var a = q;
|
|
~; //expect error
|
|
// multiple operands after ~
|
|
var mul = ~[1, 2, "abc"];
|
|
""; //expect error
|
|
// miss an operand
|
|
var b = ~;
|