# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #114432] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=114432 >
<masak> std: repeat { say "OH HAI" } <p6eval> std f43a358: OUTPUT«===SORRY!===Undeclared routine: 'repeat' used at line 1Check failedFAILED 00:00 41m» <masak> hm. <jnthn> did you mean loop? <masak> jnthn: no, I meant to check what happens if I do 'repeat' without the 'until' or 'while' after the block. <masak> std: repeat { say "OH HAI" } while True <p6eval> std f43a358: OUTPUT«ok 00:00 41m» <masak> I'm surprised it parses as a listop when the 'while' is not there. <jnthn> Hmmmm. <jnthn> Surely it doesn't backtrack there... <masak> right. <jnthn> std: repeat { my $x; say "OH HAI" } <p6eval> std f43a358: OUTPUT«===SORRY!===Undeclared routine: 'repeat' used at line 1 [...] Check failedFAILED 00:00 42m» <jnthn> r: repeat { say "OH HAI" } # curious <p6eval> rakudo 34e8d4: OUTPUT«===SORRY!===CHECK FAILED:Undefined routine '&repeat' called (line 1)» <PerlJam> That could make for some interesting code. <PerlJam> r: sub repeat { $^a.() }; repeat { say "hi" } <p6eval> rakudo 34e8d4: OUTPUT«hi» <jnthn> Wow! <PerlJam> r: sub repeat { $^a.() }; repeat { say "hi" }; my $i = 0; repeat { say "foo" } while $i++ < 3; <p6eval> rakudo 34e8d4: OUTPUT«hifoofoofoofoo» <PerlJam> good for obfuscation I guess <masak> was gonna say. <masak> I feel 'repeat' is a badly chosen name for that sub :P <jnthn> I think the parser is gonna need to commit after seeing repeat, fwiw * masak submits stdbug * masak submits rakudobug * jnthn will wait for an STD fix and steal that