Add more unwind tests for failure during construction of allocated things

This commit is contained in:
Brian Anderson 2011-09-21 10:56:28 -07:00
parent 80778f642f
commit 956bc69330
2 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,18 @@
// error-pattern:fail
fn f() -> [int] { fail; }
// Voodoo. In unwind-alt we had to do this to trigger the bug. Might
// have been to do with memory allocation patterns.
fn prime() {
@0;
}
fn partial() {
let x = @f();
}
fn main() {
prime();
partial();
}

View File

@ -0,0 +1,18 @@
// error-pattern:fail
fn f() -> [int] { fail; }
// Voodoo. In unwind-alt we had to do this to trigger the bug. Might
// have been to do with memory allocation patterns.
fn prime() {
@0;
}
fn partial() {
let x = [[0], f(), [0]];
}
fn main() {
prime();
partial();
}