Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[t/spec] tests for RT #63330 and RT #63332
git-svn-id: http://svn.pugscode.org/pugs@25444 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information
moritz committed Feb 19, 2009
1 parent d8fd82a commit 2f37cb1
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion S12-role/composition.t
@@ -1,6 +1,6 @@
use v6;
use Test;
plan 9;
plan 11;

# L<S12/Roles/"Roles may be composed into a class at compile time">

Expand Down Expand Up @@ -60,4 +60,20 @@ is $y.mB2, 'mB2', 'Can call mixed in method (two roles) 4';
is $z.mA1, 'D1.mA1', 'Can override method in a role with method in a class';
}

# diamond composition, see RT #63330

#?rakudo skip 'RT #63330'
{
role DA {
method foo { "OH HAI" };
}
role DB does DA { }
role DC does DA { }
class DD does DB does DC { };
is DD.new.foo, 'OH HAI', 'diamond role composition';
class DE is DB is DC { };
is DE.new.foo, 'OH HAI', 'same with punning and inheritance';

}

# vim: syn=perl6

0 comments on commit 2f37cb1

Please sign in to comment.