1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
=== tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts ===
// Unary operator -
// operand before -
var NUMBER1 = var NUMBER-; //expect error
>NUMBER1 : Symbol(NUMBER1, Decl(negateOperatorInvalidOperations.ts, 3, 3))
>NUMBER : Symbol(NUMBER, Decl(negateOperatorInvalidOperations.ts, 3, 17), Decl(negateOperatorInvalidOperations.ts, 11, 3))
// invalid expressions
var NUMBER2 = -(null - undefined);
>NUMBER2 : Symbol(NUMBER2, Decl(negateOperatorInvalidOperations.ts, 6, 3))
>undefined : Symbol(undefined)
var NUMBER3 = -(null - null);
>NUMBER3 : Symbol(NUMBER3, Decl(negateOperatorInvalidOperations.ts, 7, 3))
var NUMBER4 = -(undefined - undefined);
>NUMBER4 : Symbol(NUMBER4, Decl(negateOperatorInvalidOperations.ts, 8, 3))
>undefined : Symbol(undefined)
>undefined : Symbol(undefined)
// miss operand
var NUMBER =-;
>NUMBER : Symbol(NUMBER, Decl(negateOperatorInvalidOperations.ts, 3, 17), Decl(negateOperatorInvalidOperations.ts, 11, 3))
|