Skip to content

Commit 1f52ddf

Browse files
committed
Add xfail'd test for default methods.
1 parent b1ec0a5 commit 1f52ddf

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//xfail-test
2+
3+
trait Cat {
4+
fn meow() -> bool;
5+
fn scratch() -> bool;
6+
fn purr() -> bool { true }
7+
}
8+
9+
impl int : Cat {
10+
fn meow() -> bool {
11+
self.scratch()
12+
}
13+
fn scratch() -> bool {
14+
self.purr()
15+
}
16+
}
17+
18+
fn main() {
19+
assert 5.meow();
20+
}

0 commit comments

Comments
 (0)