mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
24 lines
555 B
TypeScript
24 lines
555 B
TypeScript
//// [tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorInvalidOperations.ts] ////
|
|
|
|
//// [logicalNotOperatorInvalidOperations.ts]
|
|
// Unary operator !
|
|
declare var b: number;
|
|
|
|
// operand before !
|
|
var BOOLEAN1 = b!; //expect error
|
|
|
|
// miss parentheses
|
|
var BOOLEAN2 = !b + b;
|
|
|
|
// miss an operand
|
|
var BOOLEAN3 =!;
|
|
|
|
//// [logicalNotOperatorInvalidOperations.js]
|
|
"use strict";
|
|
// operand before !
|
|
var BOOLEAN1 = b; //expect error
|
|
// miss parentheses
|
|
var BOOLEAN2 = !b + b;
|
|
// miss an operand
|
|
var BOOLEAN3 = !;
|