Permalink
Browse files

[t/spec] RT #62730

git-svn-id: http://svn.pugscode.org/pugs@26821 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent 9b100df commit c3f1caff3594179a7f5b1c5943c59db90d08a59b moritz committed May 13, 2009
Showing with 15 additions and 1 deletion.
  1. +2 −0 S06-signature/passing-hashes.t
  2. +13 −1 S06-signature/slurpy-and-interplation.t
@@ -25,3 +25,5 @@ sanity;
# Hash passed to a sub used to become a List in pugs
insanity %h;
+
+# vim: ft=perl6
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 4;
+plan 6;
# L<S03/Argument List Interpolating/"interpolate">
@@ -27,3 +27,15 @@ is(invoke2(sub ($a, $b) { return "a: $a b: $b"}, 1, 2), 'a: 1 b: 2',
dies_ok {
invoke2(sub ($a, $b) { return "a: $a b: $b"}, 1, 2, 3);
}, '... slurpy args flattening and not matching because of too many parameters';
+
+# used to be a Rakudo regression, RT #62730
+
+{
+ sub f1(*%h) { %h.perl };
+ sub f2(*%h) { f1(|%h) };
+ lives_ok { f2( :a(1) ) },
+ 'Can interpolate hashes into slurpy named parameters';
+ is eval(f2(:a(4))).<a>, 4, '... with a sane return value';
+}
+
+# vim: ft=perl6

0 comments on commit c3f1caf

Please sign in to comment.