File: inOperatorWithValidOperands.symbols

package info (click to toggle)
node-typescript 2.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 203,952 kB
  • ctags: 52,987
  • sloc: sh: 11; makefile: 5
file content (93 lines) | stat: -rw-r--r-- 3,715 bytes parent folder | download | duplicates (2)
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
85
86
87
88
89
90
91
92
93
=== tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithValidOperands.ts ===
var x: any;
>x : Symbol(x, Decl(inOperatorWithValidOperands.ts, 0, 3))

// valid left operands
// the left operand is required to be of type Any, the String primitive type, or the Number primitive type
var a1: string;
>a1 : Symbol(a1, Decl(inOperatorWithValidOperands.ts, 4, 3))

var a2: number;
>a2 : Symbol(a2, Decl(inOperatorWithValidOperands.ts, 5, 3))

var ra1 = x in x;
>ra1 : Symbol(ra1, Decl(inOperatorWithValidOperands.ts, 7, 3))
>x : Symbol(x, Decl(inOperatorWithValidOperands.ts, 0, 3))
>x : Symbol(x, Decl(inOperatorWithValidOperands.ts, 0, 3))

var ra2 = a1 in x;
>ra2 : Symbol(ra2, Decl(inOperatorWithValidOperands.ts, 8, 3))
>a1 : Symbol(a1, Decl(inOperatorWithValidOperands.ts, 4, 3))
>x : Symbol(x, Decl(inOperatorWithValidOperands.ts, 0, 3))

var ra3 = a2 in x;
>ra3 : Symbol(ra3, Decl(inOperatorWithValidOperands.ts, 9, 3))
>a2 : Symbol(a2, Decl(inOperatorWithValidOperands.ts, 5, 3))
>x : Symbol(x, Decl(inOperatorWithValidOperands.ts, 0, 3))

var ra4 = '' in x;
>ra4 : Symbol(ra4, Decl(inOperatorWithValidOperands.ts, 10, 3))
>x : Symbol(x, Decl(inOperatorWithValidOperands.ts, 0, 3))

var ra5 = 0 in x;
>ra5 : Symbol(ra5, Decl(inOperatorWithValidOperands.ts, 11, 3))
>x : Symbol(x, Decl(inOperatorWithValidOperands.ts, 0, 3))

// valid right operands
// the right operand is required to be of type Any, an object type, or a type parameter type
var b1: {};
>b1 : Symbol(b1, Decl(inOperatorWithValidOperands.ts, 15, 3))

var rb1 = x in b1;
>rb1 : Symbol(rb1, Decl(inOperatorWithValidOperands.ts, 17, 3))
>x : Symbol(x, Decl(inOperatorWithValidOperands.ts, 0, 3))
>b1 : Symbol(b1, Decl(inOperatorWithValidOperands.ts, 15, 3))

var rb2 = x in {};
>rb2 : Symbol(rb2, Decl(inOperatorWithValidOperands.ts, 18, 3))
>x : Symbol(x, Decl(inOperatorWithValidOperands.ts, 0, 3))

function foo<T>(t: T) {
>foo : Symbol(foo, Decl(inOperatorWithValidOperands.ts, 18, 18))
>T : Symbol(T, Decl(inOperatorWithValidOperands.ts, 20, 13))
>t : Symbol(t, Decl(inOperatorWithValidOperands.ts, 20, 16))
>T : Symbol(T, Decl(inOperatorWithValidOperands.ts, 20, 13))

    var rb3 = x in t;
>rb3 : Symbol(rb3, Decl(inOperatorWithValidOperands.ts, 21, 7))
>x : Symbol(x, Decl(inOperatorWithValidOperands.ts, 0, 3))
>t : Symbol(t, Decl(inOperatorWithValidOperands.ts, 20, 16))
}

interface X { x: number }
>X : Symbol(X, Decl(inOperatorWithValidOperands.ts, 22, 1))
>x : Symbol(X.x, Decl(inOperatorWithValidOperands.ts, 24, 13))

interface Y { y: number }
>Y : Symbol(Y, Decl(inOperatorWithValidOperands.ts, 24, 25))
>y : Symbol(Y.y, Decl(inOperatorWithValidOperands.ts, 25, 13))

var c1: X | Y;
>c1 : Symbol(c1, Decl(inOperatorWithValidOperands.ts, 27, 3))
>X : Symbol(X, Decl(inOperatorWithValidOperands.ts, 22, 1))
>Y : Symbol(Y, Decl(inOperatorWithValidOperands.ts, 24, 25))

var c2: X;
>c2 : Symbol(c2, Decl(inOperatorWithValidOperands.ts, 28, 3))
>X : Symbol(X, Decl(inOperatorWithValidOperands.ts, 22, 1))

var c3: Y;
>c3 : Symbol(c3, Decl(inOperatorWithValidOperands.ts, 29, 3))
>Y : Symbol(Y, Decl(inOperatorWithValidOperands.ts, 24, 25))

var rc1 = x in c1;
>rc1 : Symbol(rc1, Decl(inOperatorWithValidOperands.ts, 31, 3))
>x : Symbol(x, Decl(inOperatorWithValidOperands.ts, 0, 3))
>c1 : Symbol(c1, Decl(inOperatorWithValidOperands.ts, 27, 3))

var rc2 = x in (c2 || c3);
>rc2 : Symbol(rc2, Decl(inOperatorWithValidOperands.ts, 32, 3))
>x : Symbol(x, Decl(inOperatorWithValidOperands.ts, 0, 3))
>c2 : Symbol(c2, Decl(inOperatorWithValidOperands.ts, 28, 3))
>c3 : Symbol(c3, Decl(inOperatorWithValidOperands.ts, 29, 3))