Skip to content

Commit 147b088

Browse files
committed
Test for use of break as an expression
The test was meant to verify that the typechecker correctly allows a _|_ value (break, here) to be used in any context. However, the compiler fails with an LLVM assertion failure. I xfailed it, but wanted it to be on the record anyway.
1 parent 1a96e79 commit 147b088

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/test/run-pass/break-value.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//xfail-stage0
2+
//xfail-stage1
3+
//xfail-stage2
4+
//xfail-stage3
5+
fn int_id(int x) -> int {
6+
ret x;
7+
}
8+
9+
fn main() {
10+
while(true) {
11+
int_id(break);
12+
}
13+
}

0 commit comments

Comments
 (0)