mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
box errors in flat type
This commit is contained in:
parent
9581195c1b
commit
06f07700d4
4 changed files with 5 additions and 5 deletions
|
@ -841,7 +841,7 @@ fn type_to_variable(
|
||||||
result
|
result
|
||||||
}
|
}
|
||||||
Erroneous(problem) => {
|
Erroneous(problem) => {
|
||||||
let content = Content::Structure(FlatType::Erroneous(problem.clone()));
|
let content = Content::Structure(FlatType::Erroneous(Box::new(problem.clone())));
|
||||||
|
|
||||||
register(subs, rank, pools, content)
|
register(subs, rank, pools, content)
|
||||||
}
|
}
|
||||||
|
|
|
@ -4499,6 +4499,6 @@ mod solve_expr {
|
||||||
std::mem::size_of::<roc_types::types::Problem>(),
|
std::mem::size_of::<roc_types::types::Problem>(),
|
||||||
);
|
);
|
||||||
|
|
||||||
assert_eq!(query, (40, 96, 80, 72, 64))
|
assert_eq!(query, (40, 80, 64, 56, 64))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -465,7 +465,7 @@ impl SolvedType {
|
||||||
}
|
}
|
||||||
EmptyRecord => SolvedType::EmptyRecord,
|
EmptyRecord => SolvedType::EmptyRecord,
|
||||||
EmptyTagUnion => SolvedType::EmptyTagUnion,
|
EmptyTagUnion => SolvedType::EmptyTagUnion,
|
||||||
Erroneous(problem) => SolvedType::Erroneous(problem.clone()),
|
Erroneous(problem) => SolvedType::Erroneous(*problem.clone()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -627,7 +627,7 @@ pub enum FlatType {
|
||||||
TagUnion(MutMap<TagName, Vec<Variable>>, Variable),
|
TagUnion(MutMap<TagName, Vec<Variable>>, Variable),
|
||||||
FunctionOrTagUnion(TagName, Symbol, Variable),
|
FunctionOrTagUnion(TagName, Symbol, Variable),
|
||||||
RecursiveTagUnion(Variable, MutMap<TagName, Vec<Variable>>, Variable),
|
RecursiveTagUnion(Variable, MutMap<TagName, Vec<Variable>>, Variable),
|
||||||
Erroneous(Problem),
|
Erroneous(Box<Problem>),
|
||||||
EmptyRecord,
|
EmptyRecord,
|
||||||
EmptyTagUnion,
|
EmptyTagUnion,
|
||||||
}
|
}
|
||||||
|
@ -1242,7 +1242,7 @@ fn flat_type_to_err_type(
|
||||||
}
|
}
|
||||||
|
|
||||||
Erroneous(problem) => {
|
Erroneous(problem) => {
|
||||||
state.problems.push(problem);
|
state.problems.push(*problem);
|
||||||
|
|
||||||
ErrorType::Error
|
ErrorType::Error
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue