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