From 6cb7ebfb9f8d1c0784ade7d4481bac389ef8860a Mon Sep 17 00:00:00 2001 From: MasterDuke17 Date: Thu, 26 Oct 2017 23:20:53 -0400 Subject: [PATCH] Use the new nqp::fromI_I in Int.new The op will create a new Int using the value of the given Int, but remove any mix-ins. --- src/core/Int.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/Int.pm b/src/core/Int.pm index bc818bdea4f..220e0d53135 100644 --- a/src/core/Int.pm +++ b/src/core/Int.pm @@ -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:) {