Skip to content
Permalink
Browse files

Revert "We should always .STORE unless it's a List itself"

This reverts commit 307a98b.

Turns out Ranges are also Positional.  So until we have a candidate that
handles Ranges, we should revert to the original condition.  dogbert++
for spotting.
  • Loading branch information...
lizmat committed Nov 10, 2018
1 parent 76d2fde commit 843118ea3464f710b47ff85e5cd2e01fd744cb04
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/core/Hyper.pm6
@@ -95,7 +95,8 @@ class Hyper {
nqp::create(List), List, '$!reified', values
);
nqp::bind(result,nqp::clone(left).STORE(result))
unless nqp::eqaddr(left.WHAT,List); # don't need to .STORE
if nqp::istype(left.WHAT,List) # a subtype of List
&& nqp::not_i(nqp::eqaddr(left.WHAT,List));
nqp::iscont(left) ?? result.item !! result
}

@@ -124,7 +125,8 @@ class Hyper {
nqp::create(List), List, '$!reified', values
);
nqp::bind(result,nqp::clone(right).STORE(result))
unless nqp::eqaddr(right.WHAT,List); # don't need to .STORE
if nqp::istype(right.WHAT,List) # a subtype of List
&& nqp::not_i(nqp::eqaddr(right.WHAT,List));
nqp::iscont(right) ?? result.item !! result
}

0 comments on commit 843118e

Please sign in to comment.
You can’t perform that action at this time.