New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slurpy positionals cause type constraints to be ignored on named args #6618
Comments
From @zoffixznetThe following code tries to pass Str `:bin` named arg to a Code that wants an `Int` `:bin` arg. <Zoffix__> m: -> Int :$bin {say [$bin, $bin.^name]}(:bin<x>) NOTE: fixing this will likely have some fallout to watch out for, including test breakage in core (e.g., as I write this, accessing $*ARGFILES would've been |
From @zoffixznetP.S.: this problem appears to not exist on JVM per https://irclog.perlgeek.de/perl6-dev/2017-10-15#i_15304908 |
From @zoffixznetAnother couple of datapoints (IRC: https://irclog.perlgeek.de/perl6-dev/2017-10-15#i_15305041): The `where` clause gets run even when types don't typecheck and its return value still affects the typecheck: <Zoffix__> m: -> *@, Int :$bin where {sleep 2; True} {say [$bin, $bin.^name]}(:bin<x>) |
Migrated from rt.perl.org#132307 (status was 'new')
Searchable as RT132307$
The text was updated successfully, but these errors were encountered: