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
's;' wrongly parsed as subroutine call in Rakudo #3004
Comments
From @masak<doy> r: sub s () { given 9 { return 0 when $_ %% 3; 1 } }; say s |
From @jnthnOn Sun Dec 23 14:29:06 2012, masak wrote:
Looks better now:
Tagging testneeded. /jnthn |
The RT System itself - Status changed from 'new' to 'open' |
From @cokeOn Mon Mar 11 12:40:13 2013, jnthn@jnthn.net wrote:
This has reverted to its original failing behavior: 21:05 < [Coke]> m: sub s () { given 9 { return 0 when $_ %% 3; 1 } }; say s -- |
From @usev6As I understand this bug report, the problem was this: <doy> r: sub s () { given 9 { return 0 when $_ %% 3; 1 } }; say s; As the subject says the "s;" was parsed as a subroutine call by Rakudo. Back in 2012 the bug could have been shown a bit shorter: $ perl6 -e 'sub s { say 42 }; s;' Now we get: $ perl6 -e 'sub s { say 42 }; s;' The "s;" is no longer parsed as a subroutine call, instead we get a parsing error. That's the correct behaviour -- and also how STD parses the code: $ viv -c -e 'sub s { say 42 }; s;' I'll add a test and close the ticket. Please correct me if I misunderstood the problem. |
1 similar comment
From @usev6As I understand this bug report, the problem was this: <doy> r: sub s () { given 9 { return 0 when $_ %% 3; 1 } }; say s; As the subject says the "s;" was parsed as a subroutine call by Rakudo. Back in 2012 the bug could have been shown a bit shorter: $ perl6 -e 'sub s { say 42 }; s;' Now we get: $ perl6 -e 'sub s { say 42 }; s;' The "s;" is no longer parsed as a subroutine call, instead we get a parsing error. That's the correct behaviour -- and also how STD parses the code: $ viv -c -e 'sub s { say 42 }; s;' I'll add a test and close the ticket. Please correct me if I misunderstood the problem. |
From @usev6I added two tests (for parsing "s;" and "m;") to S02-names-vars/names.t with the following commit: Raku/roast@9cafef7ce7 |
1 similar comment
From @usev6I added two tests (for parsing "s;" and "m;") to S02-names-vars/names.t with the following commit: Raku/roast@9cafef7ce7 |
@usev6 - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#116182 (status was 'resolved')
Searchable as RT116182$
The text was updated successfully, but these errors were encountered: