This commit is contained in:
ayazhafiz 2022-02-06 00:24:39 -05:00
parent 8dc92ccd97
commit c80c842a93
5 changed files with 34 additions and 4 deletions

View file

@ -35,7 +35,7 @@ pub fn add_numeric_bound_constr(
));
total_num_type
}
_ => RangedNumber(Box::new(total_num_type.clone()), range),
_ => RangedNumber(Box::new(total_num_type), range),
}
}
@ -66,7 +66,7 @@ pub fn int_literal(
Category::Int,
region,
),
Eq(num_type, expected.clone(), Category::Int, region),
Eq(num_type, expected, Category::Int, region),
]);
exists(vec![num_var], And(constrs))

View file

@ -185,7 +185,7 @@ pub fn constrain_pattern(
let num_type = builtins::add_numeric_bound_constr(
&mut state.constraints,
num_type.clone(),
num_type,
bound,
region,
Category::Num,