when_branch_mismatch

This commit is contained in:
Folkert 2020-04-04 16:22:00 +02:00
parent 98479511f5
commit 200adae507
3 changed files with 94 additions and 30 deletions

View file

@ -539,7 +539,11 @@ pub fn constrain_expr(
cond_type.clone(),
region,
),
ForReason(Reason::WhenBranch { index }, branch_type.clone(), region),
ForReason(
Reason::WhenBranch { index },
branch_type.clone(),
when_branch.value.region,
),
);
branch_cons.push(branch_con);