Browse Source

[matcher] don't lose exact types for unify_min

Simon Krajewski 6 years ago
parent
commit
fe0802f663
1 changed files with 3 additions and 3 deletions
  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
 							| Some e ->
 								(* 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
 							| None ->
 								(* If we have no block we have to use the `case pattern` position because that's all we have. *)