Skip to content

Commit

Permalink
Unfudge a test for Rakudo. Along the way, make it not attempt to mix …
Browse files Browse the repository at this point in the history
…in to constants (which should fail, but currently doesn't in Rakudo nor Niecza).
  • Loading branch information
jnthn committed Jan 16, 2012
1 parent ab726ff commit 2327d69
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions S14-roles/mixin.t
Expand Up @@ -43,18 +43,16 @@ is $y.answer, 13, 'attribute from multi-role mixing OK';
is $y.test, 42, 'method from other role was OK too';


#?rakudo skip 'sub form of mixins'
{
role Answer { has $.answer is rw }
my $x = 0;
$x does Answer(42);
my $x = 0 but Answer(42);
is $x.answer, 42, 'role mix-in with initialization value worked';
is $x, 0, 'mixing into Int still makes it function as an Int';
}

#?rakudo skip 'sub form of mixins'

{
my $x = 0;
my $x = C1.new();
role A { has $.a is rw }
role B { has $.b is rw }
$x does A(1);
Expand All @@ -77,7 +75,6 @@ is $y.test, 42, 'method from other role was OK too';

# L<S14/Run-time Mixins/"but only if the role supplies exactly one attribute">

#?rakudo skip 'sub form of mixin'
{
role R4a {
# no attribute here
Expand Down

0 comments on commit 2327d69

Please sign in to comment.