Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
subs from the setting should be available in methods composed from a …
…role (RT #74078)
  • Loading branch information
moritz committed Oct 1, 2011
1 parent 875886c commit 82eb8fc
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions S14-roles/composition.t
@@ -1,6 +1,6 @@
use v6;
use Test;
plan 25;
plan 26;

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

Expand Down Expand Up @@ -118,6 +118,16 @@ ok rB !~~ RT64002, 'role not matched by second role it does';
ok $! ~~ /RT72856B/, 'colliding role mentioned in error (2)';
}

done;
# RT #74078
{
role UsesSettingSub {
method doit() {
uc 'a';
}
}
class ClassUsesSettingSub does UsesSettingSub { };
is ClassUsesSettingSub.new.doit, 'A',
'can use a sub from the setting in a method composed from a role';
}

# vim: syn=perl6

0 comments on commit 82eb8fc

Please sign in to comment.