Permalink
Browse files

test for RT #83512 - siglist binding with hash.

  • Loading branch information...
1 parent a48a486 commit 817476ae0462a3e8b16ae6b05a1dbaf00b181f36 @timo timo committed Dec 18, 2012
Showing with 8 additions and 1 deletion.
  1. +8 −1 S02-names-vars/signature.t
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 12;
+plan 13;
# The :() form constructs signatures similar to how \() constructs Captures.
# A subroutine's .signature is a Siglist object.
@@ -76,4 +76,11 @@ plan 12;
is $i, 3, 'asigning to an array in a signature is sane';
}
+# RT #83512
+{
+ my @list = 1..4;
+ my (:@even, :@odd) := classify { $_ %% 2 ?? 'even' !! 'odd' }, @list;
+ is @even, (2, 4), 'siglist binding with a hash works';
+}
+
# vim: ft=perl6

0 comments on commit 817476a

Please sign in to comment.