commit 2cccd144914d8715894458f317fa4c3c572cdcad (tree)
parent 59b6483d63ca68f63c0b3758e80da918629ada2c
Author: Andrew Kelley <andrew@ziglang.org>
Date: Wed, 17 Aug 2022 14:06:47 -0700
fix typo in compile error message
Diffstat:
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/Sema.zig b/src/Sema.zig
@@ -11211,7 +11211,7 @@ fn zirDiv(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Air.Ins
const rhs_val = maybe_rhs_val orelse unreachable;
const rem = lhs_val.floatRem(rhs_val, resolved_type, sema.arena, target) catch unreachable;
if (rem.compareWithZero(.neq)) {
- return sema.fail(block, src, "ambiguous coercion of division operands '{s}' and '{s}'; division has non-zero reminder '{}'", .{
+ return sema.fail(block, src, "ambiguous coercion of division operands '{s}' and '{s}'; non-zero remainder '{}'", .{
@tagName(lhs_ty.tag()), @tagName(rhs_ty.tag()), rem.fmtValue(resolved_type, sema.mod),
});
}
diff --git a/test/cases/compile_errors/ambiguous_coercion_of_division_operands.zig b/test/cases/compile_errors/ambiguous_coercion_of_division_operands.zig
@@ -15,10 +15,9 @@ export fn entry4() void {
_ = f;
}
-
// error
// backend=stage2
// target=native
//
-// :2:23: error: ambiguous coercion of division operands 'comptime_float' and 'comptime_int'; division has non-zero reminder '4'
-// :6:21: error: ambiguous coercion of division operands 'comptime_int' and 'comptime_float'; division has non-zero reminder '4'
+// :2:23: error: ambiguous coercion of division operands 'comptime_float' and 'comptime_int'; non-zero remainder '4'
+// :6:21: error: ambiguous coercion of division operands 'comptime_int' and 'comptime_float'; non-zero remainder '4'