Return actually analagus types in BranchMismatch
This commit is contained in:
parent
ca685d7ded
commit
d5649b0523
2
genir.py
2
genir.py
|
@ -91,7 +91,7 @@ def branches_2_ir(
|
||||||
(*branch_subs, *rest_substs, *branch_unif_subst)
|
(*branch_subs, *rest_substs, *branch_unif_subst)
|
||||||
))
|
))
|
||||||
case Err(unif_err): # This branch's type disagrees with the rest of the branches
|
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
|
case Err(e): # Problem parsing one of the remaining branches
|
||||||
return Err(e)
|
return Err(e)
|
||||||
case Err(_) as e: # Problem parsing expression
|
case Err(_) as e: # Problem parsing expression
|
||||||
|
|
Loading…
Reference in a new issue