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.
26 lines
No EOL
1.3 KiB
Text
26 lines
No EOL
1.3 KiB
Text
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. |