Skip to content

Commit

Permalink
revert change of integer => Integer in panic messages
Browse files Browse the repository at this point in the history
  • Loading branch information
JRMurr committed Nov 28, 2023
1 parent 4fe4041 commit 2a762f1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions crates/compiler/builtins/bitcode/src/num.zig
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ pub fn exportDivCeil(comptime T: type, comptime name: []const u8) void {
comptime var f = struct {
fn func(a: T, b: T) callconv(.C) T {
return math.divCeil(T, a, b) catch {
roc_panic("Integer division by 0!", 0);
roc_panic("integer division by 0!", 0);
unreachable;
};
}
Expand Down Expand Up @@ -382,7 +382,7 @@ pub fn exportAddOrPanic(comptime T: type, comptime name: []const u8) void {
fn func(self: T, other: T) callconv(.C) T {
const result = addWithOverflow(T, self, other);
if (result.has_overflowed) {
roc_panic("Integer addition overflowed!", 0);
roc_panic("integer addition overflowed!", 0);
unreachable;
} else {
return result.value;
Expand Down Expand Up @@ -440,7 +440,7 @@ pub fn exportSubOrPanic(comptime T: type, comptime name: []const u8) void {
fn func(self: T, other: T) callconv(.C) T {
const result = subWithOverflow(T, self, other);
if (result.has_overflowed) {
roc_panic("Integer subtraction overflowed!", 0);
roc_panic("integer subtraction overflowed!", 0);
unreachable;
} else {
return result.value;
Expand Down Expand Up @@ -625,7 +625,7 @@ pub fn exportMulOrPanic(comptime T: type, comptime W: type, comptime name: []con
fn func(self: T, other: T) callconv(.C) T {
const result = @call(.always_inline, mulWithOverflow, .{ T, W, self, other });
if (result.has_overflowed) {
roc_panic("Integer multiplication overflowed!", 0);
roc_panic("integer multiplication overflowed!", 0);
unreachable;
} else {
return result.value;
Expand Down
2 changes: 1 addition & 1 deletion crates/compiler/test_gen/src/gen_num.rs
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ fn gen_div_dec_by_zero() {

#[test]
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
#[should_panic(expected = r#"Roc failed with message: "Integer division by 0!"#)]
#[should_panic(expected = r#"Roc failed with message: "integer division by 0!"#)]
fn gen_div_ceil_by_zero() {
assert_evals_to!(
r#"
Expand Down

0 comments on commit 2a762f1

Please sign in to comment.