mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-15 08:15:07 +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
|
@ -21,6 +21,7 @@ use crate::type_annotation;
|
|||
use bumpalo::collections::Vec;
|
||||
use bumpalo::Bump;
|
||||
use roc_collections::soa::Slice;
|
||||
use roc_error_macros::internal_error;
|
||||
use roc_module::called_via::{BinOp, CalledVia, UnaryOp};
|
||||
use roc_region::all::{Loc, Position, Region};
|
||||
|
||||
|
@ -2479,10 +2480,10 @@ fn ident_to_expr<'a>(arena: &'a Bump, src: Ident<'a>) -> Expr<'a> {
|
|||
// TODO: make this state impossible to represent in Ident::Access,
|
||||
// by splitting out parts[0] into a separate field with a type of `&'a str`,
|
||||
// rather than a `&'a [Accessor<'a>]`.
|
||||
panic!("Parsed an Ident::Access with a first part of a tuple index");
|
||||
internal_error!("Parsed an Ident::Access with a first part of a tuple index");
|
||||
}
|
||||
None => {
|
||||
panic!("Parsed an Ident::Access with no parts");
|
||||
internal_error!("Parsed an Ident::Access with no parts");
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue