diff --git a/lib/core/src/int.ri b/lib/core/src/int.ri index 996f56acb..29522d30d 100644 --- a/lib/core/src/int.ri +++ b/lib/core/src/int.ri @@ -10,7 +10,7 @@ extend comptime_int < Stringable { /// Returns the value of `self` as a string. #[inline] public func to_string(&self) -> string { - return @as(int64, self.*).to_string(); + return @as(isize, self.*).to_string(); } } @@ -149,8 +149,8 @@ extend int64 < Stringable { } extend isize < Stringable { - public const MIN: isize := #if _x64_ int64.MIN #else int32.MIN #endif; - public const MAX: isize := #if _x64_ int64.MAX #else int32.MAX #endif; + public const MIN: isize := @as(isize, #if _x64_ int64.MIN #else int32.MIN #endif); + public const MAX: isize := @as(isize, #if _x64_ int64.MAX #else int32.MAX #endif); #[inline] public func bits() -> uint32 { diff --git a/lib/core/src/uint.c.ri b/lib/core/src/uint.c.ri index 49245e1e1..5ae4b7c3a 100644 --- a/lib/core/src/uint.c.ri +++ b/lib/core/src/uint.c.ri @@ -197,7 +197,7 @@ extend uint64 < Stringable { } extend usize < Stringable { - public const MAX: usize := #if _x64_ uint64.MAX #else uint32.MAX #endif; + public const MAX: usize := @as(usize, #if _x64_ uint64.MAX #else uint32.MAX #endif); #[inline] public func bits() -> uint32 {