20 lines
592 B
Plaintext
20 lines
592 B
Plaintext
|
==== tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorInvalidOperations.ts (4 errors) ====
|
||
|
// Unary operator !
|
||
|
var b: number;
|
||
|
|
||
|
// operand before !
|
||
|
var BOOLEAN1 = b!; //expect error
|
||
|
~
|
||
|
!!! ',' expected.
|
||
|
~
|
||
|
!!! Expression expected.
|
||
|
|
||
|
// miss parentheses
|
||
|
var BOOLEAN2 = !b + b;
|
||
|
~~~~~~
|
||
|
!!! Operator '+' cannot be applied to types 'boolean' and 'number'.
|
||
|
|
||
|
// miss an operand
|
||
|
var BOOLEAN3 =!;
|
||
|
~
|
||
|
!!! Expression expected.
|