Skip to content

Commit

Permalink
Move some Num constant rvs to their signature
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterDuke17 committed Jan 20, 2019
1 parent 304feae commit f02bceb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/core/Num.pm6
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit f02bceb

Please sign in to comment.