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
Some item assignments inside comma-separated lists are parsed with too loose precedence #4326
Comments
From @smlsAn item assignment inside a comma-separated list works as expected as long as the preceding element is a literal: ➜ dd 1, my $x = 2, 3 However when the preceding element is a sub or method call, the assignment for some reason gobbles the whole remaining list (as if it were a list assignment): ➜ dd Int(1), my $x = 2, 3 ➜ dd 1.Int, my $x = 2, 3 I would assume this is a bug. Unfortunately, http://design.perl6.org/S03.html#List_prefix_precedence does not go into details on how exactly the LHS of an assignment is supposed to determine item vs list precedence though. |
From @jnthnOn Mon Jun 15 16:22:00 2015, smls75@gmail.com wrote:
We didn't declare a fresh $*LEFTSIGIL per declarator, so we could end up with a postfix elsewhere "leaking" into the decision making. Fixed that now, and added a test in S03-operators/assignment.t. |
The RT System itself - Status changed from 'new' to 'open' |
@jnthn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#125416 (status was 'resolved')
Searchable as RT125416$
The text was updated successfully, but these errors were encountered: