Skip to content
Permalink
Browse files

Move some Num constant rvs to their signature

  • Loading branch information...
MasterDuke17 committed Jan 20, 2019
1 parent 304feae commit f02bceb7c2becb50d23ecb0a0f72e90f88bd29df
Showing with 2 additions and 4 deletions.
  1. +2 −4 src/core/Num.pm6
@@ -296,9 +296,8 @@ multi sub postfix:<++>(Num:D $a is rw) {
$a = nqp::p6box_n(nqp::add_n(nqp::unbox_n($a), 1e0));
$b
}
multi sub postfix:<++>(Num:U $a is rw) {
multi sub postfix:<++>(Num:U $a is rw --> 0e0) {
$a = 1e0;
0e0
}
multi sub postfix:<++>(num $a is rw --> num) {
my num $b = $a;
@@ -310,9 +309,8 @@ multi sub postfix:<-->(Num:D $a is rw) {
$a = nqp::p6box_n(nqp::sub_n(nqp::unbox_n($a), 1e0));
$b
}
multi sub postfix:<-->(Num:U $a is rw) {
multi sub postfix:<-->(Num:U $a is rw --> 0e0) {
$a = -1e0;
0e0
}
multi sub postfix:<-->(num $a is rw --> num) {
my num $b = $a;

0 comments on commit f02bceb

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