Skip to content

Commit

Permalink
prefix:<->(num). Wracks havoc of tests becase -Inf now generates inva…
Browse files Browse the repository at this point in the history
…lid PIR (set $N100, Inf)
  • Loading branch information
moritz committed Sep 29, 2011
1 parent 1cb3f8d commit ebf115c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/core/Num.pm
Expand Up @@ -221,6 +221,12 @@ multi postfix:<-->(Num:U \$a is rw) { # XXX
multi prefix:<->(Num:D \$a) {
nqp::p6box_n(nqp::neg_n(nqp::unbox_n($a)))
}
multi prefix:<->(num $a) {
nqp::want(
nqp::p6box_n(nqp::neg_n($a)),
'Nn', nqp::neg_n($a),
);
}

multi prefix:<abs>(Num:D \$a) {
nqp::p6box_n(nqp::abs_n(nqp::unbox_n($a)))
Expand Down

0 comments on commit ebf115c

Please sign in to comment.