Permalink
Browse files

Add xfail'd test for default methods.

  • Loading branch information...
1 parent b1ec0a5 commit 1f52ddfe9ebd64891f14ec17efa8e2a014f8a439 @lkuper lkuper committed Aug 13, 2012
Showing with 20 additions and 0 deletions.
  1. +20 −0 src/test/run-pass/traits-default-method-trivial.rs
@@ -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();
+}

0 comments on commit 1f52ddf

Please sign in to comment.