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 {...@@ -562,7 +562,7 @@ pub const Value = extern union {
562 .bool_true => return 1,562 .bool_true => return 1,
563563
564 .int_u64 => return self.cast(Payload.Int_u64).?.int,564 .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),
566 .int_big_positive => return self.cast(Payload.IntBigPositive).?.asBigInt().to(u64) catch unreachable,566 .int_big_positive => return self.cast(Payload.IntBigPositive).?.asBigInt().to(u64) catch unreachable,
567 .int_big_negative => return self.cast(Payload.IntBigNegative).?.asBigInt().to(u64) catch unreachable,567 .int_big_negative => return self.cast(Payload.IntBigNegative).?.asBigInt().to(u64) catch unreachable,
568 }568 }
...@@ -636,7 +636,7 @@ pub const Value = extern union {...@@ -636,7 +636,7 @@ pub const Value = extern union {
636636
637 .bool_true => return 1,637 .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),
640 .int_i64 => return self.cast(Payload.Int_i64).?.int,640 .int_i64 => return self.cast(Payload.Int_i64).?.int,
641 .int_big_positive => return self.cast(Payload.IntBigPositive).?.asBigInt().to(i64) catch unreachable,641 .int_big_positive => return self.cast(Payload.IntBigPositive).?.asBigInt().to(i64) catch unreachable,
642 .int_big_negative => return self.cast(Payload.IntBigNegative).?.asBigInt().to(i64) catch unreachable,642 .int_big_negative => return self.cast(Payload.IntBigNegative).?.asBigInt().to(i64) catch unreachable,