Skip Menu |
Report information
Id: 114554
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: masak <cmasak [at] gmail.com>
Cc:
AdminCc:

Severity: (no value)
Tag: Bug
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: [BUG] Definition of zero-length postfix operator wrongly allowed in Rakudo
Date: Thu, 23 Aug 2012 19:04:57 +0200
To: rakudobug [...] perl.org
From: Carl Mäsak <cmasak [...] gmail.com>
Download (untitled) / with headers
text/plain 763b
<timotimo> r: sub postfix:{}($a) { say "$a bracey brace" }; 42{} <p6eval> rakudo befe7c: OUTPUT«(timeout)» <timotimo> whoops? <moritz> r: sub postfix:<{}>($a) { say "$a bracey brace" }; 42{} <p6eval> rakudo befe7c: OUTPUT«42 bracey brace␤» <timotimo> interesting. how did i trigger a loop there? <moritz> timotimo: it created a zero-width match, which was then quantified in the grammar <timotimo> aaaah <moritz> timotimo: so it matched the empty postfix all over again <timotimo> of course. <moritz> wouldn't that be a cute way to write a debugger? <moritz> write an empty-string postfix <moritz> that automatigacally gets inserted everywhere :-) <timotimo> heh heh * masak submits rakudobug <masak> shouldn't be allowed to write empty postfixes, methinks
Behavior change: 21:06 <Mouq> r: sub postfix:{}($a) { say "$a bracey brace" }; 42{} 21:07 <camelia> rakudo 50cecf: OUTPUT«===SORRY!===␤No such method 'ast' for invocant of type 'NQPMu'␤» On Thu Aug 23 10:05:14 2012, masak wrote: Show quoted text
> <timotimo> r: sub postfix:{}($a) { say "$a bracey brace" }; 42{} > <p6eval> rakudo befe7c: OUTPUT«(timeout)» > <timotimo> whoops? > <moritz> r: sub postfix:<{}>($a) { say "$a bracey brace" }; 42{} > <p6eval> rakudo befe7c: OUTPUT«42 bracey brace␤» > <timotimo> interesting. how did i trigger a loop there? > <moritz> timotimo: it created a zero-width match, which was then > quantified in the grammar > <timotimo> aaaah > <moritz> timotimo: so it matched the empty postfix all over again > <timotimo> of course. > <moritz> wouldn't that be a cute way to write a debugger? > <moritz> write an empty-string postfix > <moritz> that automatigacally gets inserted everywhere :-) > <timotimo> heh heh > * masak submits rakudobug > <masak> shouldn't be allowed to write empty postfixes, methinks
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 199b
new behavior: 13:30 <diakopter> m: sub postfix:{}($a) { say "$a bracey brace" }; 42{} 13:30 <camelia> rakudo-moar 61d231: OUTPUT«===SORRY!===␤Internal error: find_var_decl could not find $_␤»
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 657b
On Thu, 07 Apr 2016 10:31:20 -0700, diakopter wrote: Show quoted text
> new behavior: > > 13:30 <diakopter> m: sub postfix:{}($a) { say "$a bracey brace" }; > 42{} > 13:30 <camelia> rakudo-moar 61d231: OUTPUT«===SORRY!===␤Internal > error: find_var_decl could not find $_␤»
Couple more glitches in the same area: 14:59 Zoffix m: my $z:{:42foo} 14:59 camelia rakudo-moar 26522e8ac: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤You can't adverb $z␤at <tmp>:1␤------> 3my $z:{:42foo}7⏏5<EOL>␤» 14:59 Zoffix m: my \z:{:42foo} 14:59 camelia rakudo-moar 26522e8ac: OUTPUT: «===SORRY!===␤Cannot find method 'ast' on object of type NQPMu␤»


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org