Explorar o código

[matcher] don't lose exact types for unify_min

Simon Krajewski %!s(int64=6) %!d(string=hai) anos
pai
achega
fe0802f663
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  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. *)