rust/src/test/run-fail/unwind-box-iface.rs

19 lines
185 B
Rust
Raw Normal View History

2012-03-26 18:25:29 -05:00
// error-pattern:fail
fn failfn() {
fail;
}
iface i {
fn foo();
}
impl of i for ~int {
fn foo() { }
}
fn main() {
let x = ~0 as i;
failfn();
log(error, x);
}