Skip to content

Commit

Permalink
Native operators should use nqp::want; get infix:<+>(int, int) to do so.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Sep 29, 2011
1 parent 7b09735 commit f70067c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/Int.pm
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ multi infix:<+>(Int \$a, Int \$b) {
nqp::p6box_i(nqp::add_i(nqp::unbox_i($a), nqp::unbox_i($b)))
}
multi infix:<+>(int $a, int $b) {
nqp::add_i($a, $b)
nqp::want(nqp::p6box_i(nqp::add_i($a, $b)),
'IiNn', nqp::add_i($a, $b))
}

multi infix:<->(Int \$a, Int \$b) {
Expand Down

0 comments on commit f70067c

Please sign in to comment.