Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
test for RT #76600, augmenting a class should not re-apply roles
  • Loading branch information
moritz committed Oct 3, 2011
1 parent 1f36ea3 commit b518730
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion S12-class/augment-supersede.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 7;
plan 8;

# L<S12/"Open vs Closed Classes"/"Otherwise you'll get a class redefinition error.">

Expand Down Expand Up @@ -37,6 +37,15 @@ eval_dies_ok q[
augment class MethodClash { method foo() { 3 } };
], 'cannot override a method by monkey-typing';

# RT #76600
eval_lives_ok q[
use MONKEY_TYPING;
role Bar { has $.counter; }
class Pub does Bar { has $.saloon; }
augment class Pub { method snug() { } }
], 'augmenting a class which has a role composed works';


#?rakudo skip 'supersede'
{
class Bar {
Expand Down

0 comments on commit b518730

Please sign in to comment.