mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
chore: replace panic! with internal_error
This commit is contained in:
parent
f6221fb9e9
commit
8bf888a5e6
8 changed files with 27 additions and 17 deletions
|
@ -338,7 +338,7 @@ pub fn canonicalize_module_defs<'a>(
|
|||
can_exposed_imports.insert(symbol, region);
|
||||
}
|
||||
Err((_shadowed_symbol, _region)) => {
|
||||
panic!("TODO gracefully handle shadowing in imports.")
|
||||
internal_error!("TODO gracefully handle shadowing in imports.")
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -359,7 +359,7 @@ pub fn canonicalize_module_defs<'a>(
|
|||
// here we do nothing special
|
||||
}
|
||||
Err((shadowed_symbol, _region)) => {
|
||||
panic!(
|
||||
internal_error!(
|
||||
"TODO gracefully handle shadowing in imports, {:?} is shadowed.",
|
||||
shadowed_symbol
|
||||
)
|
||||
|
@ -523,7 +523,7 @@ pub fn canonicalize_module_defs<'a>(
|
|||
GeneratedInfo::Builtin => {
|
||||
match crate::builtins::builtin_defs_map(*symbol, var_store) {
|
||||
None => {
|
||||
panic!("A builtin module contains a signature without implementation for {:?}", symbol)
|
||||
internal_error!("A builtin module contains a signature without implementation for {:?}", symbol)
|
||||
}
|
||||
Some(replacement_def) => {
|
||||
declarations.update_builtin_def(index, replacement_def);
|
||||
|
@ -581,7 +581,7 @@ pub fn canonicalize_module_defs<'a>(
|
|||
GeneratedInfo::Builtin => {
|
||||
match crate::builtins::builtin_defs_map(*symbol, var_store) {
|
||||
None => {
|
||||
panic!("A builtin module contains a signature without implementation for {:?}", symbol)
|
||||
internal_error!("A builtin module contains a signature without implementation for {:?}", symbol)
|
||||
}
|
||||
Some(replacement_def) => {
|
||||
declarations.update_builtin_def(index, replacement_def);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue