[Bug #21439] Fix PM_SPLAT_NODE compilation error in for loops (#13597)
[Bug #21439] Fix PM_SPLAT_NODE compilation error in for loops
This commit fixes a crash that occurred when using splat nodes (*) as
the index variable in for loops. The error "Unexpected node type for
index in for node: PM_SPLAT_NODE" was thrown because the compiler
didn't know how to handle splat nodes in this context.
The fix allows code like for *x in [[1,2], [3,4]] to compile and
execute correctly, where the splat collects each sub-array.
Related issues
Bug #21439: Crash with PM_SPLAT_NODE compiler error (Prism)
[Bug #21439] Fix
PM_SPLAT_NODE
compilation error in for loops (#13597)[Bug #21439] Fix PM_SPLAT_NODE compilation error in for loops
This commit fixes a crash that occurred when using splat nodes (*) as
the index variable in for loops. The error "Unexpected node type for
index in for node: PM_SPLAT_NODE" was thrown because the compiler
didn't know how to handle splat nodes in this context.
The fix allows code like
for *x in [[1,2], [3,4]]
to compile andexecute correctly, where the splat collects each sub-array.