Skip to content

Commit bca6134

Browse files
committed
Add tests for RT #76462
1 parent c7d9b73 commit bca6134

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

S02-literals/autoref.t

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use Test;
1616
1717
=end description
1818

19-
plan 57;
19+
plan 59;
2020

2121
# Implicit referentiation of arrays in assignment
2222
{
@@ -288,4 +288,14 @@ plan 57;
288288
is +$pair.key, 2, '({...} => "value") works';
289289
}
290290

291+
# RT #76462
292+
{
293+
lives_ok { my $a = (\my %h)<a> },
294+
'no Null PMC access when hash indexing a hash ref';
295+
my %h = ( 'a' => 1, 'b' => 2 );
296+
my $h_ref = \%h;
297+
lives_ok { my $b = $h_ref.{"a"} },
298+
'no Null PMC access when trying to hash index a Capture';
299+
}
300+
291301
# vim: ft=perl6

0 commit comments

Comments
 (0)