Skip to content
Permalink
Browse files

Make sure X handles empty lists on RHS

Fixes R#2286
  • Loading branch information...
lizmat committed Sep 17, 2018
1 parent 0a45ffb commit 6c93fde85da027748bddd7cf75e295ed70ce3b05
Showing with 6 additions and 6 deletions.
  1. +6 −6 src/core/Rakudo/Iterator.pm6
@@ -1133,18 +1133,18 @@ class Rakudo::Iterator {

# it's a List, may have a reified we can use directly
nqp::if(
nqp::isnull(
nqp::isconcrete(
$elem := nqp::getattr($elem,List,'$!reified')
) || nqp::iseq_i(nqp::elems($elem),0),

# cross with an empty list is always an empty list
(return Rakudo::Iterator.Empty),
) && nqp::isgt_i(nqp::elems($elem),0),

# use the available reified directly
nqp::stmts(
nqp::bindpos($!reifieds,$i,$elem),
nqp::atpos($elem,0)
)
),

# cross with an empty list is always an empty list
(return Rakudo::Iterator.Empty)
),

# need to set up an iterator

0 comments on commit 6c93fde

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