Skip to content

Commit

Permalink
add test for RT #125371
Browse files Browse the repository at this point in the history
  • Loading branch information
FROGGS committed Aug 27, 2015
1 parent 3bddd39 commit c86bb56
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion S04-declarations/my.t
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 96;
plan 97;

#L<S04/The Relationship of Blocks and Declarations/"declarations, all
# lexically scoped declarations are visible">
Expand Down Expand Up @@ -162,6 +162,12 @@ is(EVAL('loop (my $x = 1, my $y = 2; $x > 0; $x--) { last }; $y #OK'), 2, '2nd m
# RT #125371
throws-like 'my $z = $z', X::Syntax::Variable::Initializer, name => '$z';

# RT #125371
{
my $py = 0 && try { my $py = 42; $py.bla() };
is $py, 0, 'initializing a variable using a try block containing same name works';
}

# interaction of my and EVAL
# yes, it's weird... but that's the way it is
# http://irclog.perlgeek.de/perl6/2009-03-19#i_1001177
Expand Down

0 comments on commit c86bb56

Please sign in to comment.