@@ -59,35 +59,61 @@ function foo<T>(t: T) {
59
59
>t : Symbol(t, Decl(inOperatorWithValidOperands.ts, 20, 16))
60
60
}
61
61
62
+ function unionCase<T, U>(t: T | U) {
63
+ >unionCase : Symbol(unionCase, Decl(inOperatorWithValidOperands.ts, 22, 1))
64
+ >T : Symbol(T, Decl(inOperatorWithValidOperands.ts, 24, 19))
65
+ >U : Symbol(U, Decl(inOperatorWithValidOperands.ts, 24, 21))
66
+ >t : Symbol(t, Decl(inOperatorWithValidOperands.ts, 24, 25))
67
+ >T : Symbol(T, Decl(inOperatorWithValidOperands.ts, 24, 19))
68
+ >U : Symbol(U, Decl(inOperatorWithValidOperands.ts, 24, 21))
69
+
70
+ var rb4 = x in t;
71
+ >rb4 : Symbol(rb4, Decl(inOperatorWithValidOperands.ts, 25, 7))
72
+ >x : Symbol(x, Decl(inOperatorWithValidOperands.ts, 0, 3))
73
+ >t : Symbol(t, Decl(inOperatorWithValidOperands.ts, 24, 25))
74
+ }
75
+
76
+ function unionCase2<T>(t: T | object) {
77
+ >unionCase2 : Symbol(unionCase2, Decl(inOperatorWithValidOperands.ts, 26, 1))
78
+ >T : Symbol(T, Decl(inOperatorWithValidOperands.ts, 28, 20))
79
+ >t : Symbol(t, Decl(inOperatorWithValidOperands.ts, 28, 23))
80
+ >T : Symbol(T, Decl(inOperatorWithValidOperands.ts, 28, 20))
81
+
82
+ var rb5 = x in t;
83
+ >rb5 : Symbol(rb5, Decl(inOperatorWithValidOperands.ts, 29, 7))
84
+ >x : Symbol(x, Decl(inOperatorWithValidOperands.ts, 0, 3))
85
+ >t : Symbol(t, Decl(inOperatorWithValidOperands.ts, 28, 23))
86
+ }
87
+
62
88
interface X { x: number }
63
- >X : Symbol(X, Decl(inOperatorWithValidOperands.ts, 22 , 1))
64
- >x : Symbol(X.x, Decl(inOperatorWithValidOperands.ts, 24 , 13))
89
+ >X : Symbol(X, Decl(inOperatorWithValidOperands.ts, 30 , 1))
90
+ >x : Symbol(X.x, Decl(inOperatorWithValidOperands.ts, 32 , 13))
65
91
66
92
interface Y { y: number }
67
- >Y : Symbol(Y, Decl(inOperatorWithValidOperands.ts, 24 , 25))
68
- >y : Symbol(Y.y, Decl(inOperatorWithValidOperands.ts, 25 , 13))
93
+ >Y : Symbol(Y, Decl(inOperatorWithValidOperands.ts, 32 , 25))
94
+ >y : Symbol(Y.y, Decl(inOperatorWithValidOperands.ts, 33 , 13))
69
95
70
96
var c1: X | Y;
71
- >c1 : Symbol(c1, Decl(inOperatorWithValidOperands.ts, 27 , 3))
72
- >X : Symbol(X, Decl(inOperatorWithValidOperands.ts, 22 , 1))
73
- >Y : Symbol(Y, Decl(inOperatorWithValidOperands.ts, 24 , 25))
97
+ >c1 : Symbol(c1, Decl(inOperatorWithValidOperands.ts, 35 , 3))
98
+ >X : Symbol(X, Decl(inOperatorWithValidOperands.ts, 30 , 1))
99
+ >Y : Symbol(Y, Decl(inOperatorWithValidOperands.ts, 32 , 25))
74
100
75
101
var c2: X;
76
- >c2 : Symbol(c2, Decl(inOperatorWithValidOperands.ts, 28 , 3))
77
- >X : Symbol(X, Decl(inOperatorWithValidOperands.ts, 22 , 1))
102
+ >c2 : Symbol(c2, Decl(inOperatorWithValidOperands.ts, 36 , 3))
103
+ >X : Symbol(X, Decl(inOperatorWithValidOperands.ts, 30 , 1))
78
104
79
105
var c3: Y;
80
- >c3 : Symbol(c3, Decl(inOperatorWithValidOperands.ts, 29 , 3))
81
- >Y : Symbol(Y, Decl(inOperatorWithValidOperands.ts, 24 , 25))
106
+ >c3 : Symbol(c3, Decl(inOperatorWithValidOperands.ts, 37 , 3))
107
+ >Y : Symbol(Y, Decl(inOperatorWithValidOperands.ts, 32 , 25))
82
108
83
109
var rc1 = x in c1;
84
- >rc1 : Symbol(rc1, Decl(inOperatorWithValidOperands.ts, 31 , 3))
110
+ >rc1 : Symbol(rc1, Decl(inOperatorWithValidOperands.ts, 39 , 3))
85
111
>x : Symbol(x, Decl(inOperatorWithValidOperands.ts, 0, 3))
86
- >c1 : Symbol(c1, Decl(inOperatorWithValidOperands.ts, 27 , 3))
112
+ >c1 : Symbol(c1, Decl(inOperatorWithValidOperands.ts, 35 , 3))
87
113
88
114
var rc2 = x in (c2 || c3);
89
- >rc2 : Symbol(rc2, Decl(inOperatorWithValidOperands.ts, 32 , 3))
115
+ >rc2 : Symbol(rc2, Decl(inOperatorWithValidOperands.ts, 40 , 3))
90
116
>x : Symbol(x, Decl(inOperatorWithValidOperands.ts, 0, 3))
91
- >c2 : Symbol(c2, Decl(inOperatorWithValidOperands.ts, 28 , 3))
92
- >c3 : Symbol(c3, Decl(inOperatorWithValidOperands.ts, 29 , 3))
117
+ >c2 : Symbol(c2, Decl(inOperatorWithValidOperands.ts, 36 , 3))
118
+ >c3 : Symbol(c3, Decl(inOperatorWithValidOperands.ts, 37 , 3))
93
119
0 commit comments