mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 15:51:12 +00:00
Clippy and a ranged number unification bugfix
This commit is contained in:
parent
364d2585df
commit
6d72971d6b
2 changed files with 9 additions and 4 deletions
|
@ -209,9 +209,14 @@ fn unify_ranged_number(
|
|||
RecursionVar { .. } | RigidVar(..) | Alias(..) | Structure(..) => {
|
||||
unify_pool(subs, pool, real_var, ctx.second, ctx.mode)
|
||||
}
|
||||
&RangedNumber(other_real_var, _other_range_vars) => {
|
||||
unify_pool(subs, pool, real_var, other_real_var, ctx.mode)
|
||||
// TODO: check and intersect "other_range_vars"
|
||||
&RangedNumber(other_real_var, other_range_vars) => {
|
||||
let outcome = unify_pool(subs, pool, real_var, other_real_var, ctx.mode);
|
||||
if outcome.is_empty() {
|
||||
check_valid_range(subs, pool, ctx.first, other_range_vars, ctx.mode)
|
||||
} else {
|
||||
outcome
|
||||
}
|
||||
// TODO: We should probably check that "range_vars" and "other_range_vars" intersect
|
||||
}
|
||||
Error => merge(subs, ctx, Error),
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue