mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 20:28:02 +00:00
Don't match empty tag union in openness constraint
This commit is contained in:
parent
f08a8aa8c7
commit
1d75934659
1 changed files with 2 additions and 3 deletions
|
@ -2423,8 +2423,8 @@ fn unify_tag_ext<M: MetaCollector>(
|
|||
};
|
||||
let legal_unification = match ext {
|
||||
TagExt::Openness(_) => {
|
||||
// Openness extensions can either unify with empty tag unions (marking them as closed),
|
||||
// or flex/rigids. Anything else is a change in the monomorphic size of the tag and not
|
||||
// Openness extensions can only unify with flex/rigids.
|
||||
// Anything else is a change in the monomorphic size of the tag and not
|
||||
// a reflection of the polymorphism of the tag, an error.
|
||||
matches!(
|
||||
env.subs.get_content_without_compacting(var),
|
||||
|
@ -2432,7 +2432,6 @@ fn unify_tag_ext<M: MetaCollector>(
|
|||
| RigidVar(..)
|
||||
| FlexAbleVar(..)
|
||||
| RigidAbleVar(..)
|
||||
| Structure(FlatType::EmptyTagUnion)
|
||||
// errors propagate
|
||||
| Error,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue