mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
Unify variables directly when possible
instead of going through a solved type
This commit is contained in:
parent
1348ec433b
commit
ecba687243
3 changed files with 141 additions and 49 deletions
|
@ -554,10 +554,10 @@ impl<'a> LambdaSet<'a> {
|
|||
}
|
||||
|
||||
Ok(()) | Err((_, Content::FlexVar(_))) => {
|
||||
// TODO hack for builting functions.
|
||||
// this can happen when there is a type error somewhere
|
||||
Ok(LambdaSet {
|
||||
set: &[],
|
||||
representation: arena.alloc(Layout::Struct(&[])),
|
||||
representation: arena.alloc(Layout::Union(UnionLayout::NonRecursive(&[]))),
|
||||
})
|
||||
}
|
||||
_ => panic!("called LambdaSet.from_var on invalid input"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue