aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--tactics/class_tactics.ml1
-rw-r--r--test-suite/bugs/closed/5550.v10
2 files changed, 11 insertions, 0 deletions
diff --git a/tactics/class_tactics.ml b/tactics/class_tactics.ml
index d1ae85e7b..2c911addf 100644
--- a/tactics/class_tactics.ml
+++ b/tactics/class_tactics.ml
@@ -593,6 +593,7 @@ let make_hints g st only_classes sign =
List.fold_left
(fun hints hyp ->
let consider =
+ not only_classes ||
let open Context.Named.Declaration in
try let t = Global.lookup_named (get_id hyp) |> get_type in
(* Section variable, reindex only if the type changed *)
diff --git a/test-suite/bugs/closed/5550.v b/test-suite/bugs/closed/5550.v
new file mode 100644
index 000000000..bb1222489
--- /dev/null
+++ b/test-suite/bugs/closed/5550.v
@@ -0,0 +1,10 @@
+Section foo.
+
+ Variable bar : Prop.
+ Variable H : bar.
+
+ Goal bar.
+ typeclasses eauto with foobar.
+ Qed.
+
+End foo.