Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix null exception in infix:<?^>.
The Parrot version of nqp::xor returns a Parrot Undef, which we really
don't have a sane equivalent of on JVM so it gives a null. This handles
it appropriately, fixing at least one test file.
  • Loading branch information
jnthn committed Jun 22, 2013
1 parent 1ab4203 commit 614d9e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/Bool.pm
Expand Up @@ -59,7 +59,7 @@ multi infix:<?|>(Mu \a, Mu \b) { a.Bool || b.Bool }

proto infix:<?^>(|) is pure { * }
multi infix:<?^>(Mu $x = Bool::False) { $x.Bool }
multi infix:<?^>(Mu \a, Mu \b) { nqp::p6bool(nqp::xor(a.Bool,b.Bool )) }
multi infix:<?^>(Mu \a, Mu \b) { nqp::p6bool(nqp::ifnull(nqp::xor(a.Bool,b.Bool), 0)) }

# These operators are normally handled as macros in the compiler;
# we define them here for use as arguments to functions.
Expand Down

0 comments on commit 614d9e0

Please sign in to comment.