2012-08-14 12:00:31 -05:00
|
|
|
//xfail-test
|
|
|
|
|
2012-08-17 12:44:52 -05:00
|
|
|
// Currently failing with an ICE in trans.
|
2012-08-14 12:00:31 -05:00
|
|
|
|
|
|
|
trait Cat {
|
|
|
|
fn meow() -> bool;
|
|
|
|
fn scratch() -> bool { self.purr() }
|
|
|
|
fn purr() -> bool { true }
|
|
|
|
}
|
|
|
|
|
|
|
|
impl int : Cat {
|
|
|
|
fn meow() -> bool {
|
|
|
|
self.scratch()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
assert 5.meow();
|
|
|
|
}
|