mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-24 06:55:15 +00:00
Try fixing a surprising constraint behavior
This commit is contained in:
parent
05e5fb4189
commit
ae2855628e
1 changed files with 2 additions and 7 deletions
|
@ -30,7 +30,6 @@ pub(crate) fn add_numeric_bound_constr(
|
|||
match range {
|
||||
NumericBound::None => {
|
||||
// no additional constraints, just a Num *
|
||||
num_num(Variable(num_var))
|
||||
}
|
||||
NumericBound::FloatExact(width) => {
|
||||
let actual_type = constraints.push_variable(float_width_to_variable(width));
|
||||
|
@ -41,8 +40,6 @@ pub(crate) fn add_numeric_bound_constr(
|
|||
constraints.equal_types(type_index, expected_index, category, region);
|
||||
|
||||
num_constraints.extend([because_suffix]);
|
||||
|
||||
Variable(num_var)
|
||||
}
|
||||
NumericBound::IntExact(width) => {
|
||||
let actual_type = constraints.push_variable(int_lit_width_to_variable(width));
|
||||
|
@ -53,8 +50,6 @@ pub(crate) fn add_numeric_bound_constr(
|
|||
constraints.equal_types(type_index, expected_index, category, region);
|
||||
|
||||
num_constraints.extend([because_suffix]);
|
||||
|
||||
Variable(num_var)
|
||||
}
|
||||
NumericBound::Range(range) => {
|
||||
let precision_type = constraints.push_variable(precision_var);
|
||||
|
@ -66,10 +61,10 @@ pub(crate) fn add_numeric_bound_constr(
|
|||
let constr = constraints.equal_types(precision_type, expected_index, category, region);
|
||||
|
||||
num_constraints.extend([constr]);
|
||||
|
||||
num_num(Variable(num_var))
|
||||
}
|
||||
}
|
||||
|
||||
num_num(Variable(num_var))
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue