2014-09-12 22:35:07 +02:00
tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorInvalidOperations.ts(5,17): error TS1005: ',' expected.
tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorInvalidOperations.ts(5,18): error TS1109: Expression expected.
tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorInvalidOperations.ts(8,16): error TS2365: Operator '+' cannot be applied to types 'boolean' and 'number'.
2014-12-17 00:56:56 +01:00
tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorInvalidOperations.ts(11,16): error TS1109: Expression expected.
2014-09-12 22:35:07 +02:00
2014-07-13 01:04:16 +02:00
==== tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorInvalidOperations.ts (4 errors) ====
// Unary operator !
var b: number;
// operand before !
var BOOLEAN1 = b!; //expect error
~
2014-09-12 00:19:57 +02:00
!!! error TS1005: ',' expected.
2014-07-13 01:04:16 +02:00
~
2014-09-12 00:19:57 +02:00
!!! error TS1109: Expression expected.
2014-07-13 01:04:16 +02:00
// miss parentheses
var BOOLEAN2 = !b + b;
~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2365: Operator '+' cannot be applied to types 'boolean' and 'number'.
2014-07-13 01:04:16 +02:00
// miss an operand
var BOOLEAN3 =!;
~
2014-09-12 00:19:57 +02:00
!!! error TS1109: Expression expected.