8000 more tests for exhaustive switch in control flow · ajafff/tsutils@0c2b0af · GitHub
[go: up one dir, main page]

8000
Skip to content

Commit 0c2b0af

Browse files
committed
more tests for exhaustive switch in control flow
1 parent 2d6fe01 commit 0c2b0af

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/rules/control-flow-typed/switch.ts.lint

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,17 @@ function test() {
7474
~~~~~~ [0]
7575
}
7676
}
77+
78+
switch (Boolean()) {
79+
case true:
80+
~~~~ [0]
81+
break;
82+
~~~~~ [0]
83+
case false:
84+
~~~~ [0]
85+
return;
86+
~~~~~~ [0]
87+
}
7788
}
7889

7990
[0]: control flow end

0 commit comments

Comments
 (0)
0