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
Unspace after a sigil-less term causes parser error #5396
Comments
From @smls my \term = 42; |
From @lizmat
Thanks for the report. Please note that you don’t need to unspace anymore in the given case: say term .Str just works since just before Christmas :-) Liz |
The RT System itself - Status changed from 'new' to 'open' |
From @zoffixznetFudged tests added in Raku/roast@44fc047be4 |
From @lizmat
FWIW, it looks like a problem in the Optimizer of all places: $ 6l 'my \a = 42; say a\ .Str' |
From @smlsThis bug is still present in This is Rakudo version 2017.05-272-gfa7aa1c36 built on MoarVM version 2017.05-25-g62bc54e9 |
From @skidsOn Sun, 28 May 2017 02:31:34 -0700, smls75@gmail.com wrote:
Not an optimizer problem, still happens with --optimize=0 Here's a history of the rule term:sym<identifier>, which apparently We start here many years ago: Then we decide we do not want typecasts to fall into this rule: Then we implement unspace between the name and the parenthesis. ...that is a bit tricky... was it intentionally not "<.unsp>? '('"? Next we get a commit that does some better error reporting (there's more <identifier> <!{ ...so, what's that new "<![:]>" for? A ':' cannot happen here So, let's look at <args>, keeping in mind that it can There's other stuff in it but this is the meat: [ ...all four cases can hit. Only the first two were hittable The unspace change would prevent the third one from being hit... The real problem comes with that fourth alternative. We of But you can fall through this case to term::sym<identifier> even a\ .Str ...is being processed as: (&a()) $_.Str Now, maybe LTM was being leaned on to force that case through <identifier> <!{ ...which passes spectest and handles these cases: $ perl6 -e 'my constant \a = 42; say a\ .Str;' ...and I'll see if I can find out what else to tweak to make $ perl6 -e 'class A { our sub foo ($a) { "OHAI $a".say } }; A::foo\(42)' ...it looks like this patch breaks the following, but I'm not sure $ perl6 -e 'say\ 42' ...and these all already worked, but I'll make sure they are tested $ perl6 -e 'say\ (42)' |
From @skidsOn Fri, 29 Sep 2017 22:43:56 -0700, bri@abrij.org wrote:
Fix added in rakudo commit f427575432 and additional tests in roast c22107d53. Resolving this ticket. |
@skids - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#128462 (status was 'resolved')
Searchable as RT128462$
The text was updated successfully, but these errors were encountered: