nahita3882 m: sub fun(*@args, Str :$s) { dd }; fun s => 3 17:39
Raku eval sub fun(*@args, Str :$s)
nahita3882 m: sub fun(Str :$s) { dd }; fun s => 3 17:40
Raku eval Exit code: 1 Type check failed in binding to parameter '$s'; expected Str but got Int (3) in sub fun at main.raku line 1 in block <unit> at main.raku line 1
nahita3882 this is unexpected right? namely the fact that it doesn't error with a type check failure in the first case
difference in two snippets is only *@args existing 17:41
librasteve Nahita: looks like a bug to me 18:28
(maybe I have missed something ... so suggest we wait for someone wiser to pass opinion and, if they also agree, then file as an issue) 18:29
m sub fun(Int :$s, *@args) { dd }; fun s => 1 18:30
m sub fun(Int :$s, *@args) { $s.say }; fun s => 1 18:31
m: sub fun(Int :$s, *@args) { $s.say }; fun s => 1 18:32
Raku eval 1
librasteve m: sub fun(Int :$s, *@args) { $s.say }; fun s => "a"
Raku eval Exit code: 1 Type check failed in binding to parameter '$s'; expected Int but got Str ("a") in sub fun at main.raku line 1 in block <unit> at main.raku line 1
librasteve seems to be fine with the *@args after the named 18:33
nahita3882 oh thanks 20:19