2012-08-14 10:00:31 -07:00
|
|
|
//xfail-test
|
|
|
|
|
2012-08-31 19:01:24 -04:00
|
|
|
// Currently failing with an ICE in trans. (FIXME: #2794)
|
2012-08-14 10:00:31 -07: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();
|
|
|
|
}
|