From d2e7c1a5dc9824a0c849619b4f8691bf726b0bfa Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Wed, 30 Jun 2010 21:00:57 -0700 Subject: [PATCH] Add two move variants of "acceptable mismatches to recover from" when the mut_ok or ext_ok flags are set. --- src/boot/me/type.ml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/boot/me/type.ml b/src/boot/me/type.ml index 9b09bf790dd..f8566d8757d 100644 --- a/src/boot/me/type.ml +++ b/src/boot/me/type.ml @@ -432,6 +432,14 @@ let process_crate (cx:ctxt) (crate:Ast.crate) : unit = TYSPEC_exterior b') -> unify_tyvars ucx a b'; !a + | (_, TYSPEC_resolved (params, Ast.TY_exterior ty)) + when ucx.ext_ok -> + unify_ty_parametric ucx ty params a; !b + + | (TYSPEC_resolved (params, Ast.TY_exterior ty), _) + when ucx.ext_ok -> + unify_ty_parametric ucx ty params b; !a + | (TYSPEC_exterior a', _) when ucx.ext_ok -> unify_tyvars ucx a' b; !a | (_, TYSPEC_exterior b') when ucx.ext_ok @@ -453,6 +461,14 @@ let process_crate (cx:ctxt) (crate:Ast.crate) : unit = TYSPEC_mutable b') -> unify_tyvars ucx a b'; !a + | (_, TYSPEC_resolved (params, Ast.TY_mutable ty)) + when ucx.mut_ok -> + unify_ty_parametric ucx ty params a; !b + + | (TYSPEC_resolved (params, Ast.TY_mutable ty), _) + when ucx.mut_ok -> + unify_ty_parametric ucx ty params b; !a + | (TYSPEC_mutable a', _) when ucx.mut_ok -> unify_tyvars ucx a' b; !a | (_, TYSPEC_mutable b') when ucx.mut_ok