Exercise self-calls and overriding together a bit more.

This commit is contained in:
Lindsey Kuper 2011-07-22 13:17:57 -07:00
parent fefeebce24
commit e71f261e3f

View File

@ -22,4 +22,16 @@ fn main() {
assert (my_b.baz() == 2);
auto my_c = obj {
fn foo() -> int {
ret 3;
}
fn baz() -> int {
ret self.foo();
}
with my_a
};
assert (my_c.baz() == 3);
assert (my_c.bar() == 3);
}