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
loop with two comma-separated 'my' variable initialisations doesn't parse in Rakudo #1016
Comments
From @masak<TimToady> rakudo: loop (my $a = 1, my $b = 2; $a < 5; $a++, $b++) { |
From @kylehaThis is an automatically generated mail to inform you that tests are now available in t/spec/S04-statements/loop.t commit e88ffdae99b59cb7c743e3a60f774e173a3409ad [t/spec] Test for RT #65962 Inline Patchdiff --git a/t/spec/S04-statements/loop.t b/t/spec/S04-statements/loop.t
index 86b9001..a5bd99a 100644
--- a/t/spec/S04-statements/loop.t
+++ b/t/spec/S04-statements/loop.t
@@ -11,7 +11,7 @@ loop statement tests
=end kwid
-plan 11;
+plan 12;
# basic loop
@@ -82,4 +82,15 @@ plan 11;
is($loopvar, 3, "bare loop exited after 3 iterations");
}
+#?rakudo skip 'RT #65962'
+{
+ my $rt65962 = 'did not loop';
+
+ loop ( my $a = 1, my $b = 2; $a < 5; $a++, $b++ ) {
+ $rt65962 = "$a $b";
+ }
+
+ is $rt65962, '4 5', 'loop with two variables in init works';
+}
+
# vim: ft=perl6 |
The RT System itself - Status changed from 'new' to 'open' |
From @masakNow with a new and not-much-friendlier error message! <masak> std: loop (my $a = 1, my $b = 2; $a < 5; $a++, $b++) { say "$a |
From @jnthnOn Sun May 24 14:44:40 2009, masak wrote:
Works now and test in loop.t is enabled (plus many others for item Thanks, Jonathan |
@jnthn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#65962 (status was 'resolved')
Searchable as RT65962$
The text was updated successfully, but these errors were encountered: