Bugfix merge conflicts

This commit is contained in:
Ayaz Hafiz 2022-04-25 08:37:52 -04:00
parent 1ff18af8f6
commit 752b3ee042
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58

View file

@ -715,11 +715,7 @@ pub fn constrain_expr(
&loc_cond.value, &loc_cond.value,
Expected::NoExpectation(real_cond_type), Expected::NoExpectation(real_cond_type),
); );
// branch_cons.extend(pattern_cons); pattern_cons.push(cond_constraint);
// branch_constraints.push(constraints.and_constraint(pattern_cons));
let mut total_cons = Vec::with_capacity(1 + 2 * branches.len() + 1);
// total_cons.push(expr_con);
pattern_cons.push(expr_con);
// Now check the condition against the type expected by the branches. // Now check the condition against the type expected by the branches.
let sketched_rows = sketch_rows(real_cond_var, branches_region, branches); let sketched_rows = sketch_rows(real_cond_var, branches_region, branches);
@ -746,7 +742,7 @@ pub fn constrain_expr(
); );
let result_con = let result_con =
constraints.equal_types_var(branch_var, expected, Category::When, region); constraints.equal_types_var(body_var, expected, Category::When, region);
let total_cons = [when_body_con, result_con]; let total_cons = [when_body_con, result_con];
let branch_constraints = constraints.and_constraint(total_cons); let branch_constraints = constraints.and_constraint(total_cons);