TypeScript/tests/baselines/reference/logicalNotOperatorInvalidOperations.errors.txt
Cyrus Najmabadi f1a2e41a8a Sort diagnostics in our baseline output.
This was we don't get noisy baselines just because a different phase of the compiler reported
the diagnostic.

This helps with Yui's refactoring work to move grammar checks into the type checker.
2014-12-16 15:56:56 -08:00

26 lines
1.3 KiB
Plaintext

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'.
tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorInvalidOperations.ts(11,16): error TS1109: Expression expected.
==== tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorInvalidOperations.ts (4 errors) ====
// Unary operator !
var b: number;
// operand before !
var BOOLEAN1 = b!; //expect error
~
!!! error TS1005: ',' expected.
~
!!! error TS1109: Expression expected.
// miss parentheses
var BOOLEAN2 = !b + b;
~~~~~~
!!! error TS2365: Operator '+' cannot be applied to types 'boolean' and 'number'.
// miss an operand
var BOOLEAN3 =!;
~
!!! error TS1109: Expression expected.