浏览代码

[matcher] don't lose exact types for unify_min

Simon Krajewski 6 年之前
父节点
当前提交
fe0802f663
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/typing/matcher.ml

+ 3 - 3
src/typing/matcher.ml

@@ -1534,9 +1534,9 @@ module Match = struct
 							match case.Case.case_expr with
 							match case.Case.case_expr with
 							| Some e ->
 							| Some e ->
 								(* If we have a block, use the position of the last element. *)
 								(* If we have a block, use the position of the last element. *)
-								begin match Texpr.skip e with
-								| {eexpr = TBlock el} when el <> [] -> List.hd (List.rev el)
-								| e -> e
+								begin match e.eexpr with
+								| TBlock el when el <> [] -> List.hd (List.rev el)
+								| _ -> e
 								end
 								end
 							| None ->
 							| None ->
 								(* If we have no block we have to use the `case pattern` position because that's all we have. *)
 								(* If we have no block we have to use the `case pattern` position because that's all we have. *)