1
Fork 0

test: Add tests for issue #452

This commit is contained in:
Brian Anderson 2011-06-11 00:27:34 +00:00
parent c734c969fb
commit 2723e1c48f
2 changed files with 35 additions and 0 deletions

View file

@ -0,0 +1,19 @@
// error-pattern:explicit failure
fn f() -> ! { fail }
fn g() -> int {
auto x = alt (true) {
case (true) {
f()
}
case (false) {
10
}
};
ret x;
}
fn main() {
g();
}

View file

@ -0,0 +1,16 @@
// error-pattern:explicit failure
fn f() -> ! { fail }
fn g() -> int {
auto x = if (true) {
f()
} else {
10
};
ret x;
}
fn main() {
g();
}