feat: better implicit int casts now

This commit is contained in:
rvcas 2021-06-06 00:51:58 -04:00
parent a3c9009867
commit f6c8c0ff32

View file

@ -16,7 +16,7 @@ pub const RocDec = struct {
pub const one_point_zero: comptime RocDec = .{ .num = one_point_zero_i128 }; pub const one_point_zero: comptime RocDec = .{ .num = one_point_zero_i128 };
pub fn fromU64(num: u64) RocDec { pub fn fromU64(num: u64) RocDec {
return .{ .num = @intCast(i128, num) * one_point_zero_i128 }; return .{ .num = num * one_point_zero_i128 };
} }
pub fn fromString(roc_str: RocStr) ?RocDec { pub fn fromString(roc_str: RocStr) ?RocDec {