Skip to content

Commit 7c84efd

Browse files
authored
if if if if
1 parent 374c63e commit 7c84efd

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/test/run-pass/weird-exprs.rs

+9
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,14 @@ fn i_yield() {
149149
};
150150
}
151151

152+
fn match_nested_if() {
153+
let val = match () {
154+
() if if if if true {true} else {false} {true} else {false} {true} else {false} => true,
155+
_ => false,
156+
};
157+
assert!(val);
158+
}
159+
152160
pub fn main() {
153161
strange();
154162
funny();
@@ -166,4 +174,5 @@ pub fn main() {
166174
punch_card();
167175
r#match();
168176
i_yield();
177+
match_nested_if();
169178
}

0 commit comments

Comments
 (0)