mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
hardcode variables for empty records and tag unions
This commit is contained in:
parent
2270d2c30d
commit
eb7d9d98e6
4 changed files with 14 additions and 13 deletions
|
@ -472,16 +472,8 @@ fn type_to_variable(
|
|||
|
||||
register(subs, rank, pools, content)
|
||||
}
|
||||
EmptyRec => {
|
||||
let content = Content::Structure(FlatType::EmptyRecord);
|
||||
|
||||
register(subs, rank, pools, content)
|
||||
}
|
||||
EmptyTagUnion => {
|
||||
let content = Content::Structure(FlatType::EmptyTagUnion);
|
||||
|
||||
register(subs, rank, pools, content)
|
||||
}
|
||||
EmptyRec => Variable::EMPTY_RECORD,
|
||||
EmptyTagUnion => Variable::EMPTY_TAG_UNION,
|
||||
|
||||
// This case is important for the rank of boolean variables
|
||||
Boolean(boolean_algebra::Bool(Atom::Variable(var), rest)) if rest.is_empty() => *var,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue