aboutsummaryrefslogtreecommitdiffhomepage
path: root/test-suite/success/clear.v
diff options
context:
space:
mode:
authorGravatar Matthieu Sozeau <mattam@mattam.org>2016-10-12 16:18:02 +0200
committerGravatar Matthieu Sozeau <mattam@mattam.org>2016-10-21 17:43:12 +0200
commit0aec9033a0b78ee1629f7aabce1c8a2e3cfbe619 (patch)
tree5f4f09a2796572e98d09208c46f52a919ba4cc8f /test-suite/success/clear.v
parentf667e270116aaf46f1c27b5a925d3ffaf0d31365 (diff)
sections/hints: prevent Not_found in get_type_of
due to cleared/reverted section variables. This fixes the get_type_of but requires keeping information around about the section hyps available in goals during resolution. It's optimized for the non-section case (should incur no cost there), and the case where no section variables are cleared.
Diffstat (limited to 'test-suite/success/clear.v')
-rw-r--r--test-suite/success/clear.v18
1 files changed, 18 insertions, 0 deletions
diff --git a/test-suite/success/clear.v b/test-suite/success/clear.v
index 976bec737..e25510cf0 100644
--- a/test-suite/success/clear.v
+++ b/test-suite/success/clear.v
@@ -13,3 +13,21 @@ Goal forall y z, (forall x:nat, x=y -> True) -> y=z -> True.
reflexivity.
Qed.
+Class A.
+
+Section Foo.
+
+ Variable a : A.
+
+ Goal A.
+ solve [typeclasses eauto].
+ Undo 1.
+ clear a.
+ try typeclasses eauto.
+ assert(a:=Build_A).
+ solve [ typeclasses eauto ].
+ Undo 2.
+ assert(b:=Build_A).
+ solve [ typeclasses eauto ].
+ Qed.
+End Foo. \ No newline at end of file