Skip to content

Commit

Permalink
RT #114836, shared variable between loop body and conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Sep 12, 2012
1 parent 04d2c1d commit 88de4c9
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion S04-statements/repeat.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 17;
plan 18;

# L<S04/The C<repeat> statement/"more Pascal-like repeat loop">

Expand Down Expand Up @@ -116,4 +116,14 @@ plan 17;
ok $tracker === True, 'placeholders and "repeat while" mix';
}

# RT #114836
{
lives_ok {
my $condition;
repeat {
$condition = False;
} while $condition;
}, 'can share variable between loop body and condition';
}

# vim: ft=perl6

0 comments on commit 88de4c9

Please sign in to comment.