mirror of
https://github.com/roc-lang/roc.git
synced 2025-11-03 06:02:54 +00:00
Lints
This commit is contained in:
parent
2f74d0b1b9
commit
91d61424ad
2 changed files with 10 additions and 12 deletions
|
|
@ -1017,7 +1017,7 @@ impl VarStore {
|
|||
let next = (subs.utable.len()) as u32;
|
||||
debug_assert!(next >= Variable::FIRST_USER_SPACE_VAR.0);
|
||||
|
||||
VarStore { next: next }
|
||||
VarStore { next }
|
||||
}
|
||||
|
||||
pub fn peek(&mut self) -> u32 {
|
||||
|
|
|
|||
|
|
@ -2426,18 +2426,16 @@ fn unify_tag_ext<M: MetaCollector>(
|
|||
// 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
|
||||
// a reflection of the polymorphism of the tag, an error.
|
||||
match env.subs.get_content_without_compacting(var) {
|
||||
FlexVar(..) | RigidVar(..) | FlexAbleVar(..) | RigidAbleVar(..) => true,
|
||||
Structure(s) => match s {
|
||||
FlatType::EmptyTagUnion => true,
|
||||
_ => false,
|
||||
},
|
||||
Error => {
|
||||
matches!(
|
||||
env.subs.get_content_without_compacting(var),
|
||||
FlexVar(..)
|
||||
| RigidVar(..)
|
||||
| FlexAbleVar(..)
|
||||
| RigidAbleVar(..)
|
||||
| Structure(FlatType::EmptyTagUnion)
|
||||
// errors propagate
|
||||
true
|
||||
}
|
||||
_ => false,
|
||||
}
|
||||
| Error,
|
||||
)
|
||||
}
|
||||
TagExt::Any(_) => true,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue