mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
feat: better implicit int casts now
This commit is contained in:
parent
a3c9009867
commit
f6c8c0ff32
1 changed files with 1 additions and 1 deletions
|
@ -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 {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue