rust/src/test/run-pass/issue-718.rs

29 lines
336 B
Rust
Raw Normal View History

2011-07-20 15:19:22 -07:00
//xfail-stage0
//xfail-stage1
//xfail-stage2
//xfail-stage3
2011-07-20 15:19:22 -07:00
fn main() {
obj a() {
fn foo() -> int {
ret 2;
}
}
auto my_a = a();
auto my_b = obj() {
with my_a
};
assert (my_b.foo() == 2);
auto my_c = obj() {
with my_b
};
assert (my_c.foo() == 2);
}