Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[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...
commit a8fc23f8da8d7eeef77a6cd42e20173be2372242 1 parent babe750
authored March 11, 2010

Showing 1 changed file with 14 additions and 1 deletion. Show diff stats Hide diff stats

  1. 15  S14-roles/composition.t
15  S14-roles/composition.t
... ...
@@ -1,6 +1,6 @@
1 1
 use v6;
2 2
 use Test;
3  
-plan 20;
  3
+plan 22;
4 4
 
5 5
 # L<S14/Roles/"Roles may be composed into a class at compile time">
6 6
 
@@ -96,6 +96,19 @@ ok rB !~~ RT64002, 'role not matched by second role it does';
96 96
     is IL.new.rt69919, 'Luthor', 'access lexical declared in role from method called via class that does the role';
97 97
 }
98 98
 
  99
+
  100
+# inheritance through role composition - specced in A12
  101
+# RT 69254
  102
+{
  103
+    class irA {};
  104
+    role  irB is   irA {};
  105
+    class irC does irB {};
  106
+    ok irC ~~ irB, 'role composition worked';
  107
+    ok irC ~~ irA, 'role composition transported inheritance';
  108
+
  109
+}
  110
+
  111
+
99 112
 done_testing;
100 113
 
101 114
 # vim: syn=perl6

0 notes on commit a8fc23f

Please sign in to comment.
Something went wrong with that request. Please try again.