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
Array subsignatures confused by pair elements #6077
Comments
From @dwarringConsider: sub s(@ ($a, $b, $c)) { david@X346:~$ perl6 -v |
From @LLFournI don't think this isn't a bug. This is just how signature binding works: my ($a,$b,$c) := [10,20,v => 30] It makes sense to me because otherwise what would this mean? sub s(@($a,$b,:$c)) { .... } Pair elements have to become bound to named parameters in the sub-signature. LL On Thu, Feb 16, 2017 at 2:43 AM David Warring <perl6-bugs-followup@perl.org> # New Ticket Created by David Warring Consider: sub s(@ ($a, $b, $c)) { david@X346:~$ perl6 -v |
The RT System itself - Status changed from 'new' to 'open' |
From @dwarringOn Sat, 18 Feb 2017 18:05:53 -0800, lloyd.fourn@gmail.com wrote:
Agree, consensus is that it's a restriction rather than a bug. Also discussed on irc https://irclog.perlgeek.de/perl6/2017-02-15#i_14108259 6 more elements. Show/hide. |
From @dwarringOn Wed, 15 Feb 2017 07:43:01 -0800, david.warring wrote:
sub yy($a, $b, $c) {} sub xx(|c) { yy(c); } xx(10, 20, 'v' => 30); Too few positionals passed; expected 3 arguments but got 1 I'd expected the arguments to be preserved, but the final argument, being a pair, is converted to a named argument. Just something to be aware of. |
@dwarring - Status changed from 'open' to 'rejected' |
Migrated from rt.perl.org#130787 (status was 'rejected')
Searchable as RT130787$
The text was updated successfully, but these errors were encountered: