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. In addition, if
actual bind is wanted, the :$a needs to be received raw.

Fix by binding a proper Capture, with $b passed as a named :a arg.
  • Loading branch information
zoffixznet committed Oct 9, 2017
1 parent d78ab87 commit 6c6385a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions S06-other/pairs-as-lvalues.t
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ plan 5;

throws-like 'my $var; (key => $var) = "value"', X::Assignment::RO;

#?rakudo.moar todo "NYI RT #124660"
#?rakudo.jvm skip "Flattening named argument must have VMHash REPR RT #124661"
{
my ($a, $b);
$b = 'b';
:(:$a) := $b;
:(:$a is raw) := \(:a($b));
is $a, 'b', 'can bind to single pair';
ok $a =:= $b, 'variables are bound together (?)';
}
Expand Down

0 comments on commit 6c6385a

Please sign in to comment.