rust/src/test/run-pass/anon-obj-refer-to-parallel-method.rs
2011-08-31 16:32:16 +02:00

23 lines
321 B
Rust

//xfail-test
// Test case for issue #822.
fn main() {
obj a() {
fn foo() -> int {
ret 2;
}
}
let my_a = a();
let my_b = obj() {
fn bar() -> int {
ret self.baz();
}
fn baz() -> int {
ret 3;
}
with my_a
};
}