File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,27 @@ TODO: {
86
86
is($? , 0, " No assertion failure" );
87
87
}
88
88
89
+ TODO: {
90
+ local $: :TODO = ' GH 18669' ;
91
+
92
+ my $results = fresh_perl(<<~'EOF' , {});
93
+ my $x = { arr => undef };
94
+ push(@{ $x->{ decide } ? $x->{ not_here } : $x->{ new } }, "mana");
95
+ print $x->{ new }[0];
96
+ EOF
97
+ is($? , 0, " No assertion failure" );
98
+ is($results , ' mana' , ' push on non-existent hash entry from ternary autovivifies array ref' );
99
+
100
+ $results = fresh_perl(<<~'EOF' , {});
101
+ my $x = { arr => undef };
102
+ push(@{ $x->{ decide } ? $x->{ not_here } : $x->{ arr } }, "mana");
103
+ print $x->{ arr }[0];
104
+ EOF
105
+ is($? , 0, " No assertion failure" );
106
+ is($results , ' mana' , ' push on undef hash entry from ternary autovivifies array ref' );
107
+
108
+ }
109
+
89
110
{
90
111
fresh_perl(' use re "eval";
91
112
my @r;
You can’t perform that action at this time.
0 commit comments