Skip to content

Commit

Permalink
RT #124640 fixed by merging Enum and Pair
Browse files Browse the repository at this point in the history
  • Loading branch information
niner committed Sep 9, 2015
1 parent 629c96c commit 39eef58
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 6 deletions.
2 changes: 0 additions & 2 deletions S06-traits/is-rw.t
Expand Up @@ -33,13 +33,11 @@ plan 7;
my %hash = (a => 23);
# First check .value = ... works (as this is a dependency for the next test)
try { %hash.pairs[0].value = 42 };
#?rakudo todo 'RT #124640'
is %hash<a>, 42, "pairs are mutable";

for %hash.pairs -> $pair { # Note: No "is rw"!
try { $pair.value += 100 }; # Modifies %hash
}
#?rakudo todo 'Depends on preceding test working RT #124640'
is %hash<a>, 142, "'is rw' not necessary on objects/references";
}

Expand Down
1 change: 0 additions & 1 deletion S32-array/pairs.t
Expand Up @@ -49,7 +49,6 @@ Basic C<pairs> tests, see S32.
$pair.value += 100;
} }, 'aliases returned by @array.pairs should be rw (1)';

#?rakudo todo 'Apparently not rw yet?'
is @array[1], 123, 'aliases returned by @array.pairs should be rw (2)';
}

Expand Down
4 changes: 2 additions & 2 deletions S32-hash/kv.t
Expand Up @@ -120,12 +120,12 @@ for %hash.kv -> $key, $value {
}

{
my $pair = (a => 42);
my $pair = (a => my $ = 42);

#?niecza todo 'aliases should be rw'
lives-ok { for $pair.kv -> $key, $value is rw {
$value += 100;
} }, 'aliases returned by $pair.kv should be rw (1)';
} }, 'aliases to items returned by $pair.kv should be rw (1)';

#?niecza todo 'aliases should be rw'
is $pair.value, 142, 'aliases returned by $pair.kv should be rw (2)';
Expand Down
1 change: 0 additions & 1 deletion S32-hash/pairs.t
Expand Up @@ -65,7 +65,6 @@ Basic C<pairs> tests, see S32::Containers.
$pair.value += 100;
} }, 'aliases returned by %hash.pairs should be rw (1)';

#?rakudo todo "Rakudo seems to make a copy rather than a reference, RT #124640"
is %hash<b>, 102, 'aliases returned by %hash.pairs should be rw (2)';
}

Expand Down

0 comments on commit 39eef58

Please sign in to comment.