blob: 535d492109a8c86763e5b933a803eab932b1d1f2 [file] [log] [blame]
//@ run-pass
trait Foo {
fn a(&self) -> isize;
fn b(&self) -> isize {
self.a() + 2
}
}
impl Foo for isize {
fn a(&self) -> isize {
3
}
}
pub fn main() {
assert_eq!(3.b(), 5);
}