Permalink
Browse files

RT62478 Unsupported use of C-style "for (;;)" loop

git-svn-id: http://svn.pugscode.org/pugs@30173 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
vamped
vamped committed Mar 23, 2010
1 parent e55601e commit 6991d96e2df75b6c2a2905f2f523abb8bcae0bd4
Showing with 8 additions and 0 deletions.
  1. +8 −0 S04-statements/for.t
View
@@ -476,6 +476,14 @@ eval_dies_ok('for(0..5) { }','keyword needs at least one whitespace after it');
ok rt71268() ~~ Nil, 'result of "for ^1 {}" is Nil (what else?)';
}
+# RT 62478
+{
+ eval_dies_ok 'for (my $i; $i <=3; $i++) { say $i; }', 'Unsupported use of C-style "for (;;)" loop; in Perl 6 please use "loop (;;)"';
+}
+{
+eval 'for (my $x; $x <=3; $x++) { $i; }'; diag($!);
+ok $! ~~ / 'C-style' /, 'Sensible error message';
+}
done_testing;

0 comments on commit 6991d96

Please sign in to comment.