Skip to content

Commit 2cccd14

Browse files
committed
fix typo in compile error message
1 parent 59b6483 commit 2cccd14

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/Sema.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11211,7 +11211,7 @@ fn zirDiv(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Air.Ins
1121111211
const rhs_val = maybe_rhs_val orelse unreachable;
1121211212
const rem = lhs_val.floatRem(rhs_val, resolved_type, sema.arena, target) catch unreachable;
1121311213
if (rem.compareWithZero(.neq)) {
11214-
return sema.fail(block, src, "ambiguous coercion of division operands '{s}' and '{s}'; division has non-zero reminder '{}'", .{
11214+
return sema.fail(block, src, "ambiguous coercion of division operands '{s}' and '{s}'; non-zero remainder '{}'", .{
1121511215
@tagName(lhs_ty.tag()), @tagName(rhs_ty.tag()), rem.fmtValue(resolved_type, sema.mod),
1121611216
});
1121711217
}

test/cases/compile_errors/ambiguous_coercion_of_division_operands.zig

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@ export fn entry4() void {
1515
_ = f;
1616
}
1717

18-
1918
// error
2019
// backend=stage2
2120
// target=native
2221
//
23-
// :2:23: error: ambiguous coercion of division operands 'comptime_float' and 'comptime_int'; division has non-zero reminder '4'
24-
// :6:21: error: ambiguous coercion of division operands 'comptime_int' and 'comptime_float'; division has non-zero reminder '4'
22+
// :2:23: error: ambiguous coercion of division operands 'comptime_float' and 'comptime_int'; non-zero remainder '4'
23+
// :6:21: error: ambiguous coercion of division operands 'comptime_int' and 'comptime_float'; non-zero remainder '4'

0 commit comments

Comments
 (0)