diff options
| author | Matthieu Sozeau | 2016-07-07 15:49:29 +0200 |
|---|---|---|
| committer | Matthieu Sozeau | 2016-07-07 15:49:29 +0200 |
| commit | 8b890de3642bee1140b238348dd76138b3f1a3dc (patch) | |
| tree | 450998b3004d28a7dd8c02353f2974301e08c93d | |
| parent | 294f9928e16fd541564dbe7f36b92e0fcf2c9eff (diff) | |
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).
| -rw-r--r-- | interp/constrintern.ml | 8 |
1 files 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 |
