Commit 53119a6
committed
fix refassign in non-void context
GH #22710
The experimental refassign feature, \@A = $aref, which allows an
array/hash etc to be aliased rather than copied, got broken in rvalue
non-void context by v5.39.5-56-g604c0355d2. So in something like
my $x = (\@A = $aref);
the stack was underflowing. This is because previously pp_refassign()
would leave its RH argument on the stack when returning, while my commit
above made it always pop the argument off the stack.
This commit makes it only pop the arg in void context.1 parent 4b15844 commit 53119a6
2 files changed
+13
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7516 | 7516 | | |
7517 | 7517 | | |
7518 | 7518 | | |
7519 | | - | |
| 7519 | + | |
7520 | 7520 | | |
7521 | 7521 | | |
7522 | 7522 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
228 | 239 | | |
229 | 240 | | |
230 | 241 | | |
| |||
0 commit comments