Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

test recursive nested and multiple temps; rakudo will need these fudg…

…ed unless jnthn++ fixes them soon
  • Loading branch information...
commit 38cc5b7dd0e5702e790f3af0eff091e4e1ac3db5 1 parent 27dbc07
@diakopter diakopter authored
Showing with 19 additions and 0 deletions.
  1. +19 −0 S04-blocks-and-statements/temp.t
View
19 S04-blocks-and-statements/temp.t
@@ -162,5 +162,24 @@ eval('
is $was_in_own_temp_handler, 2, ".TEMP method was executed on restoration";
}
+{
+ my $depth = 0;
+ my $c = 1;
+ sub a {
+ ++temp $c;
+ a() if ++$depth < 3;
+ }
+ a();
+ is $c, 1, 'recursive nested temps are restored properly';
+}
+
+{
+ my $a=1;
+ {
+ temp $a=2;
+ temp $a=3;
+ }
+ is $a, 1, 'multiple temps in the same scope are restored properly';
+}
# vim: ft=perl6
Please sign in to comment.
Something went wrong with that request. Please try again.