File: negateOperatorWithBooleanType.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 (84 lines) | stat: -rw-r--r-- 3,419 bytes parent folder | download | duplicates (7)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
=== tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorWithBooleanType.ts ===
// - operator on boolean type
var BOOLEAN: boolean;
>BOOLEAN : Symbol(BOOLEAN, Decl(negateOperatorWithBooleanType.ts, 1, 3))

function foo(): boolean { return true; }
>foo : Symbol(foo, Decl(negateOperatorWithBooleanType.ts, 1, 21))

class A {
>A : Symbol(A, Decl(negateOperatorWithBooleanType.ts, 3, 40))

    public a: boolean;
>a : Symbol(A.a, Decl(negateOperatorWithBooleanType.ts, 5, 9))

    static foo() { return false; }
>foo : Symbol(A.foo, Decl(negateOperatorWithBooleanType.ts, 6, 22))
}
module M {
>M : Symbol(M, Decl(negateOperatorWithBooleanType.ts, 8, 1))

    export var n: boolean;
>n : Symbol(n, Decl(negateOperatorWithBooleanType.ts, 10, 14))
}

var objA = new A();
>objA : Symbol(objA, Decl(negateOperatorWithBooleanType.ts, 13, 3))
>A : Symbol(A, Decl(negateOperatorWithBooleanType.ts, 3, 40))

// boolean type var
var ResultIsNumber1 = -BOOLEAN;
>ResultIsNumber1 : Symbol(ResultIsNumber1, Decl(negateOperatorWithBooleanType.ts, 16, 3))
>BOOLEAN : Symbol(BOOLEAN, Decl(negateOperatorWithBooleanType.ts, 1, 3))

// boolean type literal
var ResultIsNumber2 = -true;
>ResultIsNumber2 : Symbol(ResultIsNumber2, Decl(negateOperatorWithBooleanType.ts, 19, 3))

var ResultIsNumber3 = -{ x: true, y: false };
>ResultIsNumber3 : Symbol(ResultIsNumber3, Decl(negateOperatorWithBooleanType.ts, 20, 3))
>x : Symbol(x, Decl(negateOperatorWithBooleanType.ts, 20, 24))
>y : Symbol(y, Decl(negateOperatorWithBooleanType.ts, 20, 33))

// boolean type expressions
var ResultIsNumber4 = -objA.a;
>ResultIsNumber4 : Symbol(ResultIsNumber4, Decl(negateOperatorWithBooleanType.ts, 23, 3))
>objA.a : Symbol(A.a, Decl(negateOperatorWithBooleanType.ts, 5, 9))
>objA : Symbol(objA, Decl(negateOperatorWithBooleanType.ts, 13, 3))
>a : Symbol(A.a, Decl(negateOperatorWithBooleanType.ts, 5, 9))

var ResultIsNumber5 = -M.n;
>ResultIsNumber5 : Symbol(ResultIsNumber5, Decl(negateOperatorWithBooleanType.ts, 24, 3))
>M.n : Symbol(M.n, Decl(negateOperatorWithBooleanType.ts, 10, 14))
>M : Symbol(M, Decl(negateOperatorWithBooleanType.ts, 8, 1))
>n : Symbol(M.n, Decl(negateOperatorWithBooleanType.ts, 10, 14))

var ResultIsNumber6 = -foo();
>ResultIsNumber6 : Symbol(ResultIsNumber6, Decl(negateOperatorWithBooleanType.ts, 25, 3))
>foo : Symbol(foo, Decl(negateOperatorWithBooleanType.ts, 1, 21))

var ResultIsNumber7 = -A.foo();
>ResultIsNumber7 : Symbol(ResultIsNumber7, Decl(negateOperatorWithBooleanType.ts, 26, 3))
>A.foo : Symbol(A.foo, Decl(negateOperatorWithBooleanType.ts, 6, 22))
>A : Symbol(A, Decl(negateOperatorWithBooleanType.ts, 3, 40))
>foo : Symbol(A.foo, Decl(negateOperatorWithBooleanType.ts, 6, 22))

// miss assignment operators
-true;
-BOOLEAN;
>BOOLEAN : Symbol(BOOLEAN, Decl(negateOperatorWithBooleanType.ts, 1, 3))

-foo();
>foo : Symbol(foo, Decl(negateOperatorWithBooleanType.ts, 1, 21))

-true, false;
-objA.a;
>objA.a : Symbol(A.a, Decl(negateOperatorWithBooleanType.ts, 5, 9))
>objA : Symbol(objA, Decl(negateOperatorWithBooleanType.ts, 13, 3))
>a : Symbol(A.a, Decl(negateOperatorWithBooleanType.ts, 5, 9))

-M.n;
>M.n : Symbol(M.n, Decl(negateOperatorWithBooleanType.ts, 10, 14))
>M : Symbol(M, Decl(negateOperatorWithBooleanType.ts, 8, 1))
>n : Symbol(M.n, Decl(negateOperatorWithBooleanType.ts, 10, 14))