aboutsummaryrefslogtreecommitdiffhomepage
path: root/test-suite
diff options
context:
space:
mode:
authorGravatar Matthieu Sozeau <mattam@mattam.org>2016-10-11 11:57:46 +0200
committerGravatar Matthieu Sozeau <mattam@mattam.org>2016-10-11 13:49:00 +0200
commitd226adf01f20ea946bbeac4d4c5cde75a4d77f32 (patch)
tree982a186e48b8d94a04b231f19e651b89b5e85480 /test-suite
parent009718d9d0130a967261ae5d2484985522fc2f7c (diff)
Fix bug #5123: mark all shelved evars unresolvable
Previously, some splipped through and were caught by unrelated calls to typeclass resolution.
Diffstat (limited to 'test-suite')
-rw-r--r--test-suite/bugs/closed/5123.v31
1 files changed, 31 insertions, 0 deletions
diff --git a/test-suite/bugs/closed/5123.v b/test-suite/bugs/closed/5123.v
new file mode 100644
index 000000000..c171a10d1
--- /dev/null
+++ b/test-suite/bugs/closed/5123.v
@@ -0,0 +1,31 @@
+(* IN 8.5pl2 and 8.6 (4da2131), the following shows different typeclass resolution behaviors following an unshelve tactical vs. an Unshelve command: *)
+
+(*Pose an open constr to prevent immediate typeclass resolution in holes:*)
+Tactic Notation "opose" open_constr(x) "as" ident(H) := pose x as H.
+
+Inductive vect A : nat -> Type :=
+| vnil : vect A 0
+| vcons : forall (h:A) (n:nat), vect A n -> vect A (S n).
+
+Class Eqdec A := eqdec : forall a b : A, {a=b}+{a<>b}.
+
+Require Bool.
+
+Instance Bool_eqdec : Eqdec bool := Bool.bool_dec.
+
+Context `{vect_sigT_eqdec : forall A : Type, Eqdec A -> Eqdec {a : nat & vect A a}}.
+
+Typeclasses eauto := debug.
+
+Goal True.
+ unshelve opose (@vect_sigT_eqdec _ _ _ _) as H.
+ all:cycle 2.
+ eapply existT. (*BUG: Why does this do typeclass resolution in the evar?*)
+Abort.
+
+Goal True.
+ opose (@vect_sigT_eqdec _ _ _ _) as H.
+ Unshelve.
+ all:cycle 3.
+ eapply existT. (*This does no typeclass resultion, which is correct.*)
+Abort. \ No newline at end of file