File: negateOperatorInvalidOperations.symbols

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (25 lines) | stat: -rw-r--r-- 1,021 bytes parent folder | download | duplicates (5)
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))