This is an automatically generated mail to inform you that tests are now 
available in t/spec/S04-statements/if.t

commit 7dae39e04f140333b2a794ec70a4f72d4cced480
Author: moritz <mor...@c213334d-75ef-0310-aa23-eaa082d1ae64>
Date:   Mon Jun 28 20:58:57 2010 +0000

    [t/spec] test for RT #76174, "if" does not break lexical aliasing of $_ in 
a for-loop
    
    git-svn-id: http://svn.pugscode.org/p...@31485 
c213334d-75ef-0310-aa23-eaa082d1ae64

diff --git a/t/spec/S04-statements/if.t b/t/spec/S04-statements/if.t
index 561a1ca..946d3d5 100644
--- a/t/spec/S04-statements/if.t
+++ b/t/spec/S04-statements/if.t
@@ -11,7 +11,7 @@ Basic "if" tests.
 
 # L<S04/Conditional statements>
 
-plan 25;
+plan 26;
 
 my $x = 'test';
 if ($x eq $x) { pass('if ($x eq $x) {} works'); } else { flunk('if ($x eq $x) 
{} failed'); }
@@ -156,4 +156,12 @@ if (Mu) { flunk('if (Mu) {} failed'); } else { pass('if 
(Mu) {} works'); }
 # L<S04/Statement parsing/keywords require whitespace>
 eval_dies_ok('if($x > 1) {}','keyword needs at least one whitespace after it');
 
+# RT #76174
+# scoping of $_ in 'if' shouldn't break aliasing
+{
+    my @a = 0, 1, 2;
+    for @a { if $_ { $_++ } };
+    is ~...@a, '0 2 3', '"if" does not break lexical aliasing of $_'
+}
+
 # vim: ft=perl6

Reply via email to