diff options
author | 2021-05-16 23:25:12 -0700 | |
---|---|---|
committer | 2021-05-16 23:25:12 -0700 | |
commit | 154e049638753abc10ed0eca2012685fe3b831be (patch) | |
tree | bdeb6b0bf8137ee36df0aab436ac50713ddeb5ef /src/ast | |
parent | e80f865974df7aae5e2f6abb966b36497da693c6 (diff) | |
download | bun-154e049638753abc10ed0eca2012685fe3b831be.tar.gz bun-154e049638753abc10ed0eca2012685fe3b831be.tar.zst bun-154e049638753abc10ed0eca2012685fe3b831be.zip |
lots
Former-commit-id: 9ccb4dd082afbc4f94982bf092360487232d8b60
Diffstat (limited to 'src/ast')
-rw-r--r-- | src/ast/base.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ast/base.zig b/src/ast/base.zig index 904ad97bd..8e2635004 100644 --- a/src/ast/base.zig +++ b/src/ast/base.zig @@ -34,7 +34,7 @@ pub const Ref = packed struct { .source_index = std.math.maxInt(Ref.Int), }; pub fn toInt(int: anytype) Int { - return std.math.cast(Ref.Int, int) catch 0; + return std.math.lossyCast(Ref.Int, int); } pub fn isNull(self: *const Ref) bool { return self.source_index == std.math.maxInt(Ref.Int) and self.inner_index == std.math.maxInt(Ref.Int); |