Mark (>):
> Does the unpacking participate in dispatch?  If a Hash comes in as $t
> with no 'left' key, will it fail to match?


$ perl6 -e 'sub foo(%h($left)) { say $left }; foo({ left => "OH HAI" })'

$ perl6 -e 'sub foo(%h($left)) {}; foo({ no => "left key" })'
Not enough positional parameters passed; got 0 but expected 1

The error message is perhaps slightly LTA, but at least Rakudo
(correctly) fails to match.

// Carl

Reply via email to