Skip to content

Commit eb955bc

Browse files
committed
Regression tests for GH-23816
1 parent 9fdc724 commit eb955bc

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

t/op/decl-refs.t

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ BEGIN {
44
set_up_inc('../lib');
55
}
66

7-
plan 402;
7+
plan 404;
88

99
for my $decl (qw< my CORE::state our local >) {
1010
for my $funny (qw< $ @ % >) {
@@ -106,7 +106,14 @@ for $decl ('my', 'state', 'our', 'local') {
106106
} # END 'for $sigl' loop
107107
} # END 'for $decl' loop
108108

109+
109110
use feature 'refaliasing'; no warnings "experimental::refaliasing";
111+
112+
my \@bar = [];
113+
my $ref = my \@bar = [];
114+
ok defined $ref, 'GH-23816: declared_ref is defined';
115+
is ref($ref), 'ARRAY', 'GH-23816: identified array ref';
116+
110117
for $decl ('my', 'state', 'our') {
111118
for $sigl ('$', '@', '%') {
112119
my $code = '#line ' . (__LINE__+1) . ' ' . __FILE__ . "\n" . <<~'ENE';

0 commit comments

Comments
 (0)