rust/src/test/run-pass/obj-self.rs

12 lines
147 B
Rust

fn main() {
obj foo() {
fn m1() { #debug("hi!"); }
fn m2() { self.m1(); }
}
let a = foo();
a.m1();
a.m2();
}