Skip to content

Commit

Permalink
Test mixing a private method into an enum value
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Dec 12, 2018
1 parent 3985f5d commit 93c620f
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion S12-enums/thorough.t
Expand Up @@ -4,7 +4,7 @@ use MONKEY-TYPING;

use Test;

plan 59;
plan 60;

=begin description
Expand Down Expand Up @@ -120,4 +120,14 @@ ok Bool::True.perl ~~/^ 'Bool::True'/, 'Bool::True.perl';
ok B.^can("value"), '.^can(...) on an enum';
}

# https://github.com/rakudo/rakudo/issues/2535
{
my enum WithPriv <AA BB>;
AA does role {
method !privy { 44 }
method m() { self!privy }
}
is AA.m, 44, "Can mix a private method into an enum value"
}

# vim: ft=perl6

0 comments on commit 93c620f

Please sign in to comment.