Skip to content

Commit d6fcda9

Browse files
author
Jan-Olof Hendig
committed
Add test for RT #131887
1 parent 9a417ad commit d6fcda9

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

S02-types/pair.t

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use v6;
22

33
use Test;
44

5-
plan 4 * 19 + 107;
5+
plan 4 * 19 + 108;
66

77
# L<S02/Mutable types/A single key-to-value association>
88
# basic Pair
@@ -464,4 +464,13 @@ subtest 'Pair.perl with type objects' => {
464464
Pair.new(Rat, Num), Pair.new(Bool, Bool), Pair.new(Numeric, Numeric)
465465
}
466466

467+
# RT 131887
468+
{
469+
my $value = 17;
470+
my $pair = number => $value;
471+
my $obj-at1 = $pair.WHICH;
472+
$pair.freeze;
473+
is-deeply $obj-at1, $pair.WHICH, "Pair.freeze doesn't change object identity";
474+
}
475+
467476
# vim: ft=perl6

0 commit comments

Comments
 (0)