Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

state vars with list assignment initializers

  • Loading branch information...
commit 7bbd58b13e8cd7c692ad8d6730159b311b8dedd3 1 parent b1c8167
@moritz moritz authored
Showing with 11 additions and 0 deletions.
  1. +11 −0 S04-declarations/state.t
View
11 S04-declarations/state.t
@@ -322,4 +322,15 @@ eval_lives_ok 'state $x; $x', 'state outside control structure';
is f(0), 5, 'initialization not reached on first run of the functions';
}
+#?rakudo todo 'state vars in list assignment'
+{
+ sub r {
+ state ($a, $b) = (5, 42);
+ $a++; $b--;
+ "$a $b"
+ }
+ r();
+ is r(), '7 40', 'state vars and list assignment mixes';
+}
+
# vim: ft=perl6
Please sign in to comment.
Something went wrong with that request. Please try again.