chore: replace panic! with internal_error

This commit is contained in:
Jarl André Hübenthal 2023-04-21 19:57:14 +02:00
parent f6221fb9e9
commit 8bf888a5e6
No known key found for this signature in database
8 changed files with 27 additions and 17 deletions

View file

@ -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");
}
};