mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 11:52:19 +00:00
Recover Erroneous in type
This commit is contained in:
parent
58020a55d6
commit
e240b18b27
2 changed files with 11 additions and 2 deletions
|
@ -417,6 +417,7 @@ pub enum TypeTag {
|
|||
Variable(Variable),
|
||||
RangedNumber(NumericRange),
|
||||
/// A type error, which will code gen to a runtime error
|
||||
/// The problem is at the index of the type tag
|
||||
Erroneous,
|
||||
|
||||
// TypeExtension is implicit in the type slice
|
||||
|
@ -507,6 +508,11 @@ impl Types {
|
|||
.expect("typ is not a single tag union")
|
||||
}
|
||||
|
||||
#[track_caller]
|
||||
pub fn get_problem(&self, typ: &Index<TypeTag>) -> &Problem {
|
||||
self.problems.get(typ).expect("typ is not an error")
|
||||
}
|
||||
|
||||
pub fn record_fields_slices(
|
||||
&self,
|
||||
fields: RecordFields,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue