aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcoqbot-app[bot]2020-11-03 22:21:59 +0000
committerGitHub2020-11-03 22:21:59 +0000
commit077d479113c6a53543d53514470be3570c89cc8d (patch)
treee2b7dc01d5839f47bd5fd1578566a04f6facdd9e
parent008f6ebd3d681eb058646b375c07ce598e7a3149 (diff)
parent2c092c76a3cb96043c4eba837646c330c30398e4 (diff)
Merge PR #13132: Understand Mangle Names in implicit generalization
Reviewed-by: herbelin
-rw-r--r--interp/implicit_quantifiers.ml4
-rw-r--r--test-suite/bugs/closed/bug_13131.v6
2 files changed, 8 insertions, 2 deletions
diff --git a/interp/implicit_quantifiers.ml b/interp/implicit_quantifiers.ml
index 2853eef5c5..ee07fb6ed1 100644
--- a/interp/implicit_quantifiers.ml
+++ b/interp/implicit_quantifiers.ml
@@ -114,8 +114,8 @@ let generalizable_vars_of_glob_constr ?(bound=Id.Set.empty) ?(allowed=Id.Set.emp
ungeneralizable loc id) vars;
vars
-let rec make_fresh ids env x =
- if is_freevar ids env x then x else make_fresh ids env (Nameops.increment_subscript x)
+let make_fresh ids env x =
+ Namegen.next_ident_away_from x (fun x -> not (is_freevar ids env x))
let next_name_away_from na avoid =
match na with
diff --git a/test-suite/bugs/closed/bug_13131.v b/test-suite/bugs/closed/bug_13131.v
new file mode 100644
index 0000000000..b358ae3ecc
--- /dev/null
+++ b/test-suite/bugs/closed/bug_13131.v
@@ -0,0 +1,6 @@
+Set Mangle Names.
+
+Class A := {}.
+
+Lemma foo `{A} : A.
+Proof. Fail exact H. assumption. Qed.