aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Herbelin2018-10-31 15:08:13 +0100
committerHugo Herbelin2018-10-31 15:08:13 +0100
commit77c6cfc74cc4668eb79cf84670b842fad32bc059 (patch)
tree5bb522f682deb77a1a82937f04c6cc3b3f6af699
parent86971b6280a660e1db3e7567aa104f5f7eec9e8c (diff)
parent0cad7b36e43bcafd999d8266573be30387fd32d4 (diff)
Merge PR #8759: Fix #8755: Uncaught exception Ltac_plugin.Taccoerce.CannotCoerceTo.
-rw-r--r--plugins/ltac/tacinterp.ml2
-rw-r--r--test-suite/bugs/closed/bug_8755.v6
2 files changed, 7 insertions, 1 deletions
diff --git a/plugins/ltac/tacinterp.ml b/plugins/ltac/tacinterp.ml
index 528d7de549..5828494454 100644
--- a/plugins/ltac/tacinterp.ml
+++ b/plugins/ltac/tacinterp.ml
@@ -686,7 +686,7 @@ let interp_may_eval f ist env sigma = function
| ConstrContext ({loc;v=s},c) ->
(try
let (sigma,ic) = f ist env sigma c in
- let ctxt = coerce_to_constr_context (Id.Map.find s ist.lfun) in
+ let ctxt = try_interp_ltac_var coerce_to_constr_context ist (Some (env, sigma)) (make ?loc s) in
let ctxt = EConstr.Unsafe.to_constr ctxt in
let ic = EConstr.Unsafe.to_constr ic in
let c = subst_meta [Constr_matching.special_meta,ic] ctxt in
diff --git a/test-suite/bugs/closed/bug_8755.v b/test-suite/bugs/closed/bug_8755.v
new file mode 100644
index 0000000000..cd5aee4fa0
--- /dev/null
+++ b/test-suite/bugs/closed/bug_8755.v
@@ -0,0 +1,6 @@
+
+Lemma f : Type.
+Fail let i := ident:(i) in
+let t := context i [Type] in
+idtac.
+Abort.