blob: 8b2e422ad30d3d5ccb50e965ed72b0eb74ba8e0c [file] [log] [blame] [edit]
//@ run-pass
trait Cat {
fn meow(&self) -> bool;
fn scratch(&self) -> bool { self.purr() }
fn purr(&self) -> bool { true }
}
impl Cat for isize {
fn meow(&self) -> bool {
self.scratch()
}
}
pub fn main() {
assert!(5.meow());
}