authorgravatar for mail@isaacfreund.comIsaac Freund <mail@isaacfreund.com> 2020-08-16 16:24:00+02:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-08-17 01:40:46-04:00
logfc850aad619cc47eb7634a326bad670b43964532
tree1b434622e82af398456662a37e7f995407b579b7
parentaddeff889a1017beeef8c710dfdd55dbda2449e3

stage2: fix signed <-> unsigned Value casts


1 files changed, 2 insertions(+), 2 deletions(-)

src-self-hosted/value.zig+2-2
......@@ -562,7 +562,7 @@ pub const Value = extern union {
562562 .bool_true => return 1,
563563
564564 .int_u64 => return self.cast(Payload.Int_u64).?.int,
565 .int_i64 => return @intCast(u64, self.cast(Payload.Int_u64).?.int),
565 .int_i64 => return @intCast(u64, self.cast(Payload.Int_i64).?.int),
566566 .int_big_positive => return self.cast(Payload.IntBigPositive).?.asBigInt().to(u64) catch unreachable,
567567 .int_big_negative => return self.cast(Payload.IntBigNegative).?.asBigInt().to(u64) catch unreachable,
568568 }
......@@ -636,7 +636,7 @@ pub const Value = extern union {
636636
637637 .bool_true => return 1,
638638
639 .int_u64 => return @intCast(i64, self.cast(Payload.Int_i64).?.int),
639 .int_u64 => return @intCast(i64, self.cast(Payload.Int_u64).?.int),
640640 .int_i64 => return self.cast(Payload.Int_i64).?.int,
641641 .int_big_positive => return self.cast(Payload.IntBigPositive).?.asBigInt().to(i64) catch unreachable,
642642 .int_big_negative => return self.cast(Payload.IntBigNegative).?.asBigInt().to(i64) catch unreachable,