# New Ticket Created by  "Mark E. Shoulson" 
# Please include the string:  [perl #120994]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=120994 >


 Rakudo explicitly fails with a message when someone tries to use a typed
slurpy positional argument, e.g. Int *@_, but not for a typed slurpy named
argument, like Int *%_. But those aren't supported either: the argument creates
a parameter with type Associative[Int], but no matter what types are passed in,
the dispatcher slurps up the extra named parameters into a plain Hash, which
does not match.

> sub foo(Int *@_) { }
===SORRY!=== Error while compiling <unknown file>
Slurpy positionals with type constraints are not supported.
at <unknown file>:1
------> sub foo(Int *@_⏏) { }
expecting any of:
formal parameter
constraint



> sub foo(Int *%_) { }
sub foo(Int *%_) { ... }
> foo(:b(8))
Nominal type check failed for parameter '%_'; expected Associative[Int] but got
Hash instead

Reply via email to