Skip to content

Commit

Permalink
Fix and unfudge incorrect Pair binding test
Browse files Browse the repository at this point in the history
The current version attempts to bind a Str variable to a Signature
with one named arg in it. The test is fudged, as :$a gets a Mu
value instead of $b's value, and it doesn't outright die only
because Str.Capture returns an empty capture.

Fix by binding a proper Capture, with $b passed as a named :a arg.
  • Loading branch information
zoffixznet committed Oct 9, 2017
1 parent 919a2dd commit 4bf3993
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion S06-other/pairs-as-lvalues.t
Expand Up @@ -11,7 +11,7 @@ throws-like 'my $var; (key => $var) = "value"', X::Assignment::RO;
{
my ($a, $b);
$b = 'b';
:(:$a) := $b;
:(:$a) := \(:a($b));
is $a, 'b', 'can bind to single pair';
ok $a =:= $b, 'variables are bound together (?)';
}
Expand Down

0 comments on commit 4bf3993

Please sign in to comment.