Skip to content

Commit

Permalink
Bring fork up-to-date with master
Browse files Browse the repository at this point in the history
  • Loading branch information
ominitay committed Mar 29, 2024
1 parent 5b8a0aa commit 10b7a74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Sema.zig
Original file line number Diff line number Diff line change
Expand Up @@ -26340,15 +26340,15 @@ fn zirDepositExtractBits(
if (dest_ty.zigTypeTag(mod) == .ComptimeInt) {
if (maybe_lhs_val) |lhs_val| {
if (!lhs_val.isUndef(mod) and lhs_val.orderAgainstZero(mod) == .lt) {
const err = try sema.errMsg(block, lhs_src, "use of negative value '{}'", .{lhs_val.fmtValue(lhs_ty, sema.mod)});
const err = try sema.errMsg(block, lhs_src, "use of negative value '{}'", .{lhs_val.fmtValue(sema.mod)});
try sema.errNote(block, src, err, "parameters to {s} must be positive", .{builtin_name});
return sema.failWithOwnedErrorMsg(block, err);
}
}

if (maybe_rhs_val) |rhs_val| {
if (!rhs_val.isUndef(mod) and rhs_val.orderAgainstZero(mod) == .lt) {
const err = try sema.errMsg(block, rhs_src, "use of negative value '{}'", .{rhs_val.fmtValue(rhs_ty, sema.mod)});
const err = try sema.errMsg(block, rhs_src, "use of negative value '{}'", .{rhs_val.fmtValue(sema.mod)});
try sema.errNote(block, src, err, "parameters to {s} must be positive", .{builtin_name});
return sema.failWithOwnedErrorMsg(block, err);
}
Expand Down

0 comments on commit 10b7a74

Please sign in to comment.