Skip to content

Commit

Permalink
Add test for RT #111498
Browse files Browse the repository at this point in the history
  • Loading branch information
usev6 committed Apr 11, 2016
1 parent f90f4e3 commit 92543e1
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion S09-hashes/objecthash.t
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 36;
plan 37;

{
class A { method Str() { 'foo' } };
Expand Down Expand Up @@ -97,4 +97,15 @@ plan 36;
is %h.WHAT, %j.WHAT, "Clone of an object hash instance is an object hash";
}

# RT #111498
{
my $r1 = role { method foo() { 5 } };
my $r2 = role { method foo() { 7 } };
my %hash{Any};
%hash{"quux" but $r1} = 9;
%hash{"quux" but $r2} = 11;

is %hash.keys>>.foo.sort, (5, 7), 'Can use mixin objects as keys';
}

#vim: ft=perl6

0 comments on commit 92543e1

Please sign in to comment.