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
Different Behaviour With/Without Commas in Sub/Method Calls and slipped hashes #4988
Comments
From @zoffixznetI think this is related to https://rt-archive.perl.org/perl6/Ticket/Display.html?id=127134 The code below shows three scenarious: <Zoffix> m: sub SUB(:$foo) {say "[$foo]" }; my %args = :foo<foo>; SUB :foo<foo> :foo<newfoo>; SUB |%args :foo<newfoo>; SUB |%args, :foo<newfoo>; The Expected Thing™ would be that slipped hash behaves same as regular named args or at least an error/warning is shown. |
From @skidsWithout the comma, the colonpair is in infix position, which means So whether this should be an error or "work" depends on what we can teach the | Note if we fix | to use fake infix adverbs, then we create the problem It might be best to teach | to throw when it is handed such things. There are several other operators that will find themselves in the same |
The RT System itself - Status changed from 'new' to 'open' |
From @skidsOn Mon, 21 May 2018 09:13:15 -0700, bri@abrij.org wrote:
...sorry that might be OK due to the "first pair in term position"... |(1,1),(2,2),1 :g will be 1,1,:g,(2,2),1. |
Migrated from rt.perl.org#127143 (status was 'open')
Searchable as RT127143$
The text was updated successfully, but these errors were encountered: