Navigation Menu

Skip to content

Commit

Permalink
Iterable eqv Iterable should check types first
Browse files Browse the repository at this point in the history
All S03-operators/eqv.t tests pass again
  • Loading branch information
lizmat committed Sep 18, 2017
1 parent 198b849 commit 0beeef9
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/core/Mu.pm
Expand Up @@ -904,17 +904,17 @@ multi sub infix:<eqv>(Iterable:D \a, Iterable:D \b) {
nqp::unless(
nqp::eqaddr(nqp::decont(a),nqp::decont(b)),
nqp::if( # not same object
a.is-lazy,
nqp::if( # a lazy
b.is-lazy,
die("Cannot eqv lazy Iterables") # a && b lazy
),
nqp::if( # a NOT lazy
b.is-lazy,
0, # b lazy
nqp::if( # a && b NOT lazy
nqp::eqaddr(a.WHAT,b.WHAT),
nqp::if( # same type
nqp::eqaddr(a.WHAT,b.WHAT),
nqp::if( # same type
a.is-lazy,
nqp::if( # a lazy
b.is-lazy,
die("Cannot eqv lazy Iterables") # a && b lazy
),
nqp::if( # a NOT lazy
b.is-lazy,
0, # b lazy
nqp::if( # a && b NOT lazy
nqp::iseq_i((my int $elems = a.elems),b.elems),
nqp::stmts( # same # elems
(my int $i = -1),
Expand Down

0 comments on commit 0beeef9

Please sign in to comment.