# New Ticket Created by  "Carl Mäsak" 
# Please include the string:  [perl #113964]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=113964 >


<seldon> Can slurpy parameters not be typed? I'm having trouble with
sub foo(Int *@numbers) { }; Rakudo tells me "Nominal type check failed
for parameter '@numbers'; expected Positional but got Array instead"
<masak> hm.
<jnthn> I believe they cannot be.
<masak> r: sub foo(Int *@numbers) {}; foo(5, 42)
<p6eval> rakudo ee8ca1: OUTPUT«Nominal type check failed for parameter
'@numbers'; expected Positional but got Array instead [...]
<masak> in any case, that's a crappy error message.
<masak> r: say Array ~~ Positional
<p6eval> rakudo ee8ca1: OUTPUT«True␤»
<masak> was gonna say.
* masak submits LTA rakudobug
<jnthn> It's missing the type info for some reason.
<jnthn> We should perhaps just forbid the type on slurpies at all though
<jnthn> As in, catch it much earlier at compile time and say "this won't work"
<masak> aye.
<masak> that's the conservative thing to do.

Reply via email to