Skip to content

Commit 051d018

Browse files
Merge PR #17665: Remove bugged test of leaking evars in class_tactics
Reviewed-by: ppedrot Co-authored-by: ppedrot <ppedrot@users.noreply.github.com>
2 parents 63d4f4b + 4a62202 commit 051d018

File tree

2 files changed

+38
-8
lines changed

2 files changed

+38
-8
lines changed

tactics/class_tactics.ml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,14 +1019,6 @@ module Search = struct
10191019
in
10201020
let finished = Proofview.finished pv' in
10211021
let evm' = Proofview.return pv' in
1022-
let shelf = Evd.shelf evm' in
1023-
assert(Evd.fold_undefined (fun ev _ acc ->
1024-
let okev = Evd.mem evm ev || List.mem ev shelf in
1025-
if not okev then
1026-
Feedback.msg_debug
1027-
(str "leaking evar " ++ int (Evar.repr ev) ++
1028-
spc () ++ pr_ev_with_id evm' ev);
1029-
acc && okev) evm' true);
10301022
let _, evm' = Evd.pop_future_goals evm' in
10311023
let () = ppdebug 1 (fun () ->
10321024
str"Finished resolution with " ++ str(if finished then "a complete" else "an incomplete") ++

test-suite/bugs/bug_5243.v

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
Typeclasses eauto := debug.
2+
3+
Class Foo A := foo : A.
4+
5+
Hint Extern 0 (Foo _) => lazy beta delta; give_up : typeclass_instances.
6+
7+
Lemma t A : A.
8+
notypeclasses refine ((_ : Foo A)).
9+
typeclasses eauto.
10+
11+
(*
12+
No more subgoals, but there are some goals you gave up:
13+
14+
A
15+
16+
You need to go back and solve them.
17+
*)
18+
19+
Abort.
20+
21+
Lemma t A : A.
22+
refine ((_ : Foo A)).
23+
24+
(*
25+
1: looking for (Foo A) without backtracking
26+
1.1: (*external*) (lazy beta delta; give_up) on
27+
(Foo A), 0 subgoal(s)
28+
leaking evar 10
29+
A
30+
31+
Anomaly:
32+
File "tactics/class_tactics.ml", line 1345, characters 11-17: Assertion failed.
33+
Please report at http://coq.inria.fr/bugs/.
34+
*)
35+
Unshelve.
36+
all:fail. (* no more goals *)
37+
Fail Qed.
38+
Abort.

0 commit comments

Comments
 (0)