Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[t] merge oo/class_inclusion_with_inherited_class.t into spec/

git-svn-id: http://svn.pugscode.org/pugs@27429 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
commit 9c00c3e6e3d641117eb3bb953518aee4704c2ea8 1 parent 6716192
moritz authored
Showing with 25 additions and 1 deletion.
  1. +25 −1 S12-attributes/instance.t
View
26 S12-attributes/instance.t
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 127;
+plan 128;
=begin pod
@@ -507,4 +507,28 @@ is eval('Foo7e.new.attr'), 42, "default attribute value (1)";
is CodeAttr3.new.f, 'OH HAI', '&!m = method { ... } and self.&!m() work';
}
+{
+ # from t/oo/class_inclusion_with_inherited_class.t
+ # used to be a pugs regression
+
+ role A {
+ method t ( *@a ) {
+ [+] @a;
+ }
+ }
+
+ class B does A {}
+
+ class C does A {
+ has $.s is rw;
+ has B $.b is rw;
+ submethod BUILD {
+ $.b = B.new;
+ $.s = $.b.t(1, 2, 3);
+ }
+ }
+
+ is C.new.s, 6, "Test class include another class which inherited from same role";
+}
+
# vim: ft=perl6
Please sign in to comment.
Something went wrong with that request. Please try again.