Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Done
-
PUP 4.0.0
-
None
-
1
-
Language 2015-04-29
-
Bug Fix
Description
I expected the following to be equivalent:
Function call sytnax:
with(*[1, 2, 3]) |$x, $y, $z| {
|
notice $x, $y, $z
|
}
|
Method call syntax:
(*[1, 2, 3]).with |$x, $y, $z| {
|
notice $x, $y, $z
|
}
|
The function call outputs:
Notice: Scope(Class[main]): 1 2 3
|
The method call outputs an error:
Error: Evaluation Error: Parameter $y is required but no value was given at...
|
In the latter, $x is the array without being unfolded.
Note: I could not find a workaround in the syntax to be able to splat for a method call.
risk: medium
probability: low (unfolding IN arrays/method calls/etc)
severity: medium (no work arounds other than using different class function structure)
test layer: unit