Permalink
Browse files

state vars with list assignment initializers

  • Loading branch information...
1 parent b1c8167 commit 7bbd58b13e8cd7c692ad8d6730159b311b8dedd3 @moritz moritz committed Mar 9, 2012
Showing with 11 additions and 0 deletions.
  1. +11 −0 S04-declarations/state.t
View
@@ -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

0 comments on commit 7bbd58b

Please sign in to comment.