Skip to content

Commit 9375204

Browse files
committed
Add test for if without else cannot return result
1 parent 413d97f commit 9375204

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// error-pattern:`if` without `else` can not produce a result
2+
3+
fn main() {
4+
let a = if true { true };
5+
log a;
6+
}

0 commit comments

Comments
 (0)