Permalink
Browse files

[t/spec] tests for RT #61034

git-svn-id: http://svn.pugscode.org/pugs@25321 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent ecf2258 commit 1a356d7d9781a02966731d555343f7839cd27952 moritz committed Feb 13, 2009
Showing with 11 additions and 2 deletions.
  1. +6 −1 S04-blocks-and-statements/pointy.t
  2. +5 −1 S04-statements/do.t
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 13;
+plan 14;
=begin description
@@ -82,5 +82,10 @@ is $str, 'inner', 'return in pointy returns from enclosing sub';
# and the -> introduces a sig of (). TimToady #perl6 2008-May-24
eval_dies_ok(q{{ -> { $^a, $^b } }}, '-> { $^a, $^b } is illegal');
+# RT #61034
+
+lives_ok {my $x = -> {}; my $y = $x(); },
+ 'can define and execute empty pointy block';
# vim: ft=perl6
+
View
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 23;
+plan 24;
# L<S04/The do-once loop/"can't" put "statement modifier">
#?rakudo 6 todo 'do {} while/until/if is valid but should not be'
@@ -141,3 +141,7 @@ eval_dies_ok 'my $i; do { $i++ } given $i;',
} # no trailing `;'
is $a, 3, "final `}' on a line reverted to `;'";
}
+
+lives_ok { my $a = do given 5 {} }, 'empty do block lives (RT #61034)';
+
+# vim: ft=perl6

0 comments on commit 1a356d7

Please sign in to comment.