($a, $b?, $c) should be a compile error
Closed this issue · 1 comments
schwern commented
The docs say...
* If one positional param is optional, everything to the right must be
optional
method foo($a, $b?, $c?) # legal
method bar($a, $b?, $c) # illegal, ambiguous
Does "->bar(1,2)" mean $a = 1 and $b = 2 or $a = 1, $c = 3?
But method bar($a, $b?, $c) {}
does not cause a compile time error.
barefootcoder commented
Fixed by pull request #110.