Fix probable bug.
"Probable" because this was found by code inspection after enabling warning 27. I assume this could lead to an actual bug in the type-checker, but I have not tried to trigger it. Fix confirmed by @garrigue.master
parent
bbbdbdb318
commit
42a5b36bab
|
@ -2237,7 +2237,7 @@ let complete_type_list ?(allow_absent=false) env nl1 lv2 mty2 nl2 tl2 =
|
||||||
(* raise Not_found rather than Unify if the module types are incompatible *)
|
(* raise Not_found rather than Unify if the module types are incompatible *)
|
||||||
let unify_package env unify_list lv1 p1 n1 tl1 lv2 p2 n2 tl2 =
|
let unify_package env unify_list lv1 p1 n1 tl1 lv2 p2 n2 tl2 =
|
||||||
let ntl2 = complete_type_list env n1 lv2 (Mty_ident p2) n2 tl2
|
let ntl2 = complete_type_list env n1 lv2 (Mty_ident p2) n2 tl2
|
||||||
and ntl1 = complete_type_list env n2 lv2 (Mty_ident p1) n1 tl1 in
|
and ntl1 = complete_type_list env n2 lv1 (Mty_ident p1) n1 tl1 in
|
||||||
unify_list (List.map snd ntl1) (List.map snd ntl2);
|
unify_list (List.map snd ntl1) (List.map snd ntl2);
|
||||||
if eq_package_path env p1 p2
|
if eq_package_path env p1 p2
|
||||||
|| !package_subtype env p1 n1 tl1 p2 n2 tl2
|
|| !package_subtype env p1 n1 tl1 p2 n2 tl2
|
||||||
|
|
Loading…
Reference in New Issue