aboutsummaryrefslogtreecommitdiff
path: root/pretyping
diff options
context:
space:
mode:
authorherbelin2013-01-28 18:02:02 +0000
committerherbelin2013-01-28 18:02:02 +0000
commit5e8824960f68f529869ac299b030282cc916ba2c (patch)
tree522a6274cc117a8e11e59f978cd02b2cbc155619 /pretyping
parent903360f4614f2e49286b2fe3b13a37b3539e31e7 (diff)
Fixing one part of #2830 (anomaly "defined twice" due to nested calls to
the function solve_candidates introduced in 8.4). git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16163 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'pretyping')
-rw-r--r--pretyping/evarutil.ml5
1 files changed, 4 insertions, 1 deletions
diff --git a/pretyping/evarutil.ml b/pretyping/evarutil.ml
index b6e8f9d138..c2ba6d9575 100644
--- a/pretyping/evarutil.ml
+++ b/pretyping/evarutil.ml
@@ -1506,7 +1506,10 @@ let solve_candidates conv_algo env evd (evk,argsv as ev) rhs =
(filter_compatible_candidates conv_algo env evd evi args rhs) l in
match l' with
| [] -> error_cannot_unify env evd (mkEvar ev, rhs)
- | [c,evd] -> Evd.define evk c evd
+ | [c,evd] ->
+ (* solve_candidates might have been called recursively in the mean *)
+ (* time and the evar been solved by the filtering process *)
+ if Evd.is_undefined evd evk then Evd.define evk c evd else evd
| l when List.length l < List.length l' ->
let candidates = List.map fst l in
restrict_evar evd evk None (Some candidates)