rust/src/test/run-pass/obj-as.rs
Brian Anderson 07732545d2 Add xfail-stage3 directives to tests
The new test runners run stage 3
2011-07-22 10:18:28 -07:00

26 lines
410 B
Rust

// xfail-stage0
// xfail-stage1
// xfail-stage2
// xfail-stage3
obj big() {
fn one() -> int { ret 1; }
fn two() -> int { ret 2; }
fn three() -> int { ret 3; }
}
type small =
obj {
fn one() -> int ;
};
fn main() {
let big b = big();
assert (b.one() == 1);
assert (b.two() == 2);
assert (b.three() == 3);
let small s = b as small;
assert (s.one() == 1);
}