Skip to content

Commit

Permalink
Merge pull request #1217 from MasterDuke17/use_fromI_I_in_Int.new
Browse files Browse the repository at this point in the history
Use the new nqp::fromI_I in Int.new
  • Loading branch information
zoffixznet committed Nov 2, 2017
2 parents dbf0a21 + 6cb7ebf commit 264eef7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/Int.pm
Expand Up @@ -28,11 +28,11 @@ my class Int does Real { # declared in BOOTSTRAP
multi method new( \value) { self.new: value.Int }
multi method new(int \value) {
# rebox the value, so we get rid of any potential mixins
nqp::div_I(nqp::decont(value), 1, self)
nqp::fromI_I(nqp::decont(value), self)
}
multi method new(Int:D \value = 0) {
# rebox the value, so we get rid of any potential mixins
nqp::div_I(nqp::decont(value), 1, self)
nqp::fromI_I(nqp::decont(value), self)
}

multi method perl(Int:D:) {
Expand Down

0 comments on commit 264eef7

Please sign in to comment.