Skip to content

Commit 420d18a

Browse files
committed
test: Adda test that all arms of an alt may result in fail
1 parent 4504e23 commit 420d18a

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// When all branches of an alt expression result in fail, the entire
2+
// alt expression results in fail.
3+
4+
fn main() {
5+
auto x = alt (true) {
6+
case (true) {
7+
10
8+
}
9+
case (true) {
10+
alt (true) {
11+
case (true) {
12+
fail
13+
}
14+
case (false) {
15+
fail
16+
}
17+
}
18+
}
19+
};
20+
}

0 commit comments

Comments
 (0)