@@ -20,3 +20,93 @@ function foo(x, y) {
20
20
return 3;
21
21
}
22
22
}
23
+
24
+ declare function noop(): void;
25
+ >noop : Symbol(noop, Decl(reachabilityChecks4.ts, 12, 1))
26
+
27
+ declare function fail(): never;
28
+ >fail : Symbol(fail, Decl(reachabilityChecks4.ts, 14, 30))
29
+
30
+ function f1(x: 0 | 1 | 2) {
31
+ >f1 : Symbol(f1, Decl(reachabilityChecks4.ts, 15, 31))
32
+ >x : Symbol(x, Decl(reachabilityChecks4.ts, 17, 12))
33
+
34
+ switch (x) {
35
+ >x : Symbol(x, Decl(reachabilityChecks4.ts, 17, 12))
36
+
37
+ case 0:
38
+ fail();
39
+ >fail : Symbol(fail, Decl(reachabilityChecks4.ts, 14, 30))
40
+
41
+ case 1:
42
+ noop();
43
+ >noop : Symbol(noop, Decl(reachabilityChecks4.ts, 12, 1))
44
+
45
+ case 2:
46
+ return;
47
+ }
48
+ }
49
+
50
+ // Repro from #34021
51
+
52
+ type Behavior = 'SLIDE' | 'SLIDE_OUT'
53
+ >Behavior : Symbol(Behavior, Decl(reachabilityChecks4.ts, 26, 1))
54
+
55
+ type Direction = 'LEFT' | 'RIGHT' | 'TOP' | 'BOTTOM'
56
+ >Direction : Symbol(Direction, Decl(reachabilityChecks4.ts, 30, 37))
57
+
58
+ interface Transition {
59
+ >Transition : Symbol(Transition, Decl(reachabilityChecks4.ts, 31, 52))
60
+
61
+ behavior: Behavior
62
+ >behavior : Symbol(Transition.behavior, Decl(reachabilityChecks4.ts, 33, 22))
63
+ >Behavior : Symbol(Behavior, Decl(reachabilityChecks4.ts, 26, 1))
64
+
65
+ direction: Direction
66
+ >direction : Symbol(Transition.direction, Decl(reachabilityChecks4.ts, 34, 20))
67
+ >Direction : Symbol(Direction, Decl(reachabilityChecks4.ts, 30, 37))
68
+ }
69
+
70
+ function f2(transition: Transition): any {
71
+ >f2 : Symbol(f2, Decl(reachabilityChecks4.ts, 36, 1))
72
+ >transition : Symbol(transition, Decl(reachabilityChecks4.ts, 38, 12))
73
+ >Transition : Symbol(Transition, Decl(reachabilityChecks4.ts, 31, 52))
74
+
75
+ switch (transition.behavior) {
76
+ >transition.behavior : Symbol(Transition.behavior, Decl(reachabilityChecks4.ts, 33, 22))
77
+ >transition : Symbol(transition, Decl(reachabilityChecks4.ts, 38, 12))
78
+ >behavior : Symbol(Transition.behavior, Decl(reachabilityChecks4.ts, 33, 22))
79
+
80
+ case 'SLIDE':
81
+ switch (transition.direction) {
82
+ >transition.direction : Symbol(Transition.direction, Decl(reachabilityChecks4.ts, 34, 20))
83
+ >transition : Symbol(transition, Decl(reachabilityChecks4.ts, 38, 12))
84
+ >direction : Symbol(Transition.direction, Decl(reachabilityChecks4.ts, 34, 20))
85
+
86
+ case 'LEFT':
87
+ return []
88
+ case 'RIGHT':
89
+ return []
90
+ case 'TOP':
91
+ return []
92
+ case 'BOTTOM':
93
+ return []
94
+ }
95
+ case 'SLIDE_OUT':
96
+ switch (transition.direction) {
97
+ >transition.direction : Symbol(Transition.direction, Decl(reachabilityChecks4.ts, 34, 20))
98
+ >transition : Symbol(transition, Decl(reachabilityChecks4.ts, 38, 12))
99
+ >direction : Symbol(Transition.direction, Decl(reachabilityChecks4.ts, 34, 20))
100
+
101
+ case 'LEFT':
102
+ return []
103
+ case 'RIGHT':
104
+ return []
105
+ case 'TOP':
106
+ return []
107
+ case 'BOTTOM':
108
+ return []
109
+ }
110
+ }
111
+ }
112
+
0 commit comments