diff options
| author | Pierre-Marie Pédrot | 2019-10-22 10:55:56 +0200 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2019-10-22 10:55:56 +0200 |
| commit | 487f23187413e6cf6ee117d798a9057d0008aa6a (patch) | |
| tree | 3808cc96f0884475ff089820587c69915f589be1 | |
| parent | 23a825c1b02b50991f0bed9e3f71197a46c639a5 (diff) | |
| parent | e9497e5131f13cdea86aff8ae697415d400538fd (diff) | |
Merge PR #10899: Fixes #10894 regression: uconstr was not anymore typed in the Ltac-substituted environment
Reviewed-by: ejgallego
Reviewed-by: ppedrot
| -rw-r--r-- | doc/changelog/05-tactic-language/10899-master+fix10894-regression-ltac-uconstr-typing.rst | 1 | ||||
| -rw-r--r-- | pretyping/globEnv.ml | 2 | ||||
| -rw-r--r-- | test-suite/bugs/closed/bug_10894.v | 12 |
3 files changed, 14 insertions, 1 deletions
diff --git a/doc/changelog/05-tactic-language/10899-master+fix10894-regression-ltac-uconstr-typing.rst b/doc/changelog/05-tactic-language/10899-master+fix10894-regression-ltac-uconstr-typing.rst new file mode 100644 index 0000000000..9d15b7126f --- /dev/null +++ b/doc/changelog/05-tactic-language/10899-master+fix10894-regression-ltac-uconstr-typing.rst @@ -0,0 +1 @@ +- Fixed bug #10894: Ltac1 regression in binding free names in uconstr (`#10899 <https://github.com/coq/coq/pull/10899>`_, by Hugo Herbelin). diff --git a/pretyping/globEnv.ml b/pretyping/globEnv.ml index d49a39b547..aebe47a7a7 100644 --- a/pretyping/globEnv.ml +++ b/pretyping/globEnv.ml @@ -166,7 +166,7 @@ let interp_ltac_variable ?loc typing_fun env sigma id : Evd.evar_map * unsafe_ju here, as the call to the main pretyping function is caught inside the try but I want to avoid refactoring this function too much for now. *) - typing_fun {env with lvar} term + typing_fun {env with lvar; static_env = env.renamed_env} term with Not_found -> (* Check if [id] is a ltac variable not bound to a term *) (* and build a nice error message *) diff --git a/test-suite/bugs/closed/bug_10894.v b/test-suite/bugs/closed/bug_10894.v new file mode 100644 index 0000000000..b8c9367951 --- /dev/null +++ b/test-suite/bugs/closed/bug_10894.v @@ -0,0 +1,12 @@ +(* Check that uconstrs are interpreted in the ltac-substituted environment *) +(* Was a regression introduced in 4dab4fc (#7288) *) + +Tactic Notation "bind" hyp(x) "in" uconstr(f) "as" ident(h) := + set (h := fun x => f). + +Fact test : nat -> nat. +Proof. + intros n. + bind n in (n*n) as f. + assert (f 0 = 0) by reflexivity. +Abort. |
