Permalink
Browse files

[t/spec] tests for RT #69254, role composition can transport inheritance

git-svn-id: http://svn.pugscode.org/pugs@30029 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent babe750 commit a8fc23f8da8d7eeef77a6cd42e20173be2372242 moritz committed Mar 11, 2010
Showing with 14 additions and 1 deletion.
  1. +14 −1 S14-roles/composition.t
@@ -1,6 +1,6 @@
use v6;
use Test;
-plan 20;
+plan 22;
# L<S14/Roles/"Roles may be composed into a class at compile time">
@@ -96,6 +96,19 @@ ok rB !~~ RT64002, 'role not matched by second role it does';
is IL.new.rt69919, 'Luthor', 'access lexical declared in role from method called via class that does the role';
}
+
+# inheritance through role composition - specced in A12
+# RT 69254
+{
+ class irA {};
+ role irB is irA {};
+ class irC does irB {};
+ ok irC ~~ irB, 'role composition worked';
+ ok irC ~~ irA, 'role composition transported inheritance';
+
+}
+
+
done_testing;
# vim: syn=perl6

0 comments on commit a8fc23f

Please sign in to comment.