Add xfail'd test for a default method containing 'self'.

This commit is contained in:
Lindsey Kuper 2012-08-14 10:00:31 -07:00
parent fb05f57881
commit 7bb33e6f1b

View file

@ -0,0 +1,21 @@
//xfail-test
// Right now, this fails with "attempted access of field `purr` on
// type `self`, but no public field or method with that name was
// found".
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();
}