Return actually analagus types in BranchMismatch

This commit is contained in:
Emi Simpson 2023-03-09 22:12:09 -05:00
parent ca685d7ded
commit d5649b0523
Signed by: Emi
GPG key ID: A12F2C2FFDC3D847

View file

@ -91,7 +91,7 @@ def branches_2_ir(
(*branch_subs, *rest_substs, *branch_unif_subst)
))
case Err(unif_err): # This branch's type disagrees with the rest of the branches
return Err(BranchTypesDiffer(raw_pattern, rest_branches_raw[0][0], branch_ty, rest_ty))
return Err(BranchTypesDiffer(raw_pattern, rest_branches_raw[0][0], this_branch, rest_ty))
case Err(e): # Problem parsing one of the remaining branches
return Err(e)
case Err(_) as e: # Problem parsing expression