From 8b890de3642bee1140b238348dd76138b3f1a3dc Mon Sep 17 00:00:00 2001 From: Matthieu Sozeau Date: Thu, 7 Jul 2016 15:49:29 +0200 Subject: Do not use implicit type info for (x := t) bindings This maintains compatibility, it is debatable if we should use implicit type information for lets to allow for coercions to fire. (Problem found in math-comp). --- interp/constrintern.ml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/interp/constrintern.ml b/interp/constrintern.ml index 28c7152096..270109e52e 100644 --- a/interp/constrintern.ml +++ b/interp/constrintern.ml @@ -2035,9 +2035,11 @@ let interp_rawcontext_evars env evdref k bl = let (env, par, _, impls) = List.fold_left (fun (env,params,n,impls) (na, k, b, t) -> - let t' = locate_if_hole (loc_of_glob_constr t) na t in - let t = - understand_tcc_evars env evdref ~expected_type:IsType t' in + let t' = + if Option.is_empty b then locate_if_hole (loc_of_glob_constr t) na t + else t + in + let t = understand_tcc_evars env evdref ~expected_type:IsType t' in match b with None -> let d = LocalAssum (na,t) in -- cgit v1.2.3