Add xfail'd test for default methods.
This commit is contained in:
parent
b1ec0a582e
commit
1f52ddfe9e
1 changed files with 20 additions and 0 deletions
20
src/test/run-pass/traits-default-method-trivial.rs
Normal file
20
src/test/run-pass/traits-default-method-trivial.rs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
//xfail-test
|
||||
|
||||
trait Cat {
|
||||
fn meow() -> bool;
|
||||
fn scratch() -> bool;
|
||||
fn purr() -> bool { true }
|
||||
}
|
||||
|
||||
impl int : Cat {
|
||||
fn meow() -> bool {
|
||||
self.scratch()
|
||||
}
|
||||
fn scratch() -> bool {
|
||||
self.purr()
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
assert 5.meow();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue