mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
Merge pull request #6062 from JRMurr/div-0-should-crash
Update zig `@panic` calls to `roc_panic` for numeric errors
This commit is contained in:
commit
e336aa525c
11 changed files with 71 additions and 47 deletions
|
@ -1382,7 +1382,7 @@ impl<'a> LowLevelCall<'a> {
|
|||
}
|
||||
NumAbs => {
|
||||
const PANIC_MSG: &str =
|
||||
"integer absolute overflowed because its argument is the minimum value";
|
||||
"Integer absolute overflowed because its argument is the minimum value";
|
||||
|
||||
self.load_args(backend);
|
||||
|
||||
|
@ -1446,7 +1446,7 @@ impl<'a> LowLevelCall<'a> {
|
|||
}
|
||||
NumNeg => {
|
||||
const PANIC_MSG: &str =
|
||||
"integer negation overflowed because its argument is the minimum value";
|
||||
"Integer negation overflowed because its argument is the minimum value";
|
||||
|
||||
self.load_args(backend);
|
||||
match CodeGenNumType::from(self.ret_layout) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue