Skip to content

Commit 1dfa922

Browse files
committed
Add a test for fallthrough
1 parent 41406da commit 1dfa922

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/test/nodecount.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,19 @@ func trivialReachability() {
5858
// CFG: a
5959
// CFG: b
6060
}
61+
62+
/*
63+
reaches: [
64+
["A", "B"]
65+
]
66+
*/
67+
func hasFallthrough() {
68+
switch 1 {
69+
case 1:
70+
// CFG: A
71+
fallthrough
72+
case 2:
73+
// CFG: B
74+
"Include me!"
75+
}
76+
}

0 commit comments

Comments
 (0)