From 9de1edd730eeb3cada742a27a36bc70178eda6d8 Mon Sep 17 00:00:00 2001 From: Matthieu Sozeau Date: Wed, 17 Sep 2014 11:42:05 +0200 Subject: While resolving typeclass evars in clenv, touch only the ones that appear in the clenv's value and type, ensuring we don't try to solve unrelated goals (fixes bug#3633). --- test-suite/bugs/closed/3633.v | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test-suite/bugs/closed/3633.v (limited to 'test-suite/bugs') diff --git a/test-suite/bugs/closed/3633.v b/test-suite/bugs/closed/3633.v new file mode 100644 index 0000000000..6f89ef6db7 --- /dev/null +++ b/test-suite/bugs/closed/3633.v @@ -0,0 +1,21 @@ +Set Typeclasses Strict Resolution. +Class Contr (A : Type) := { center : A }. +Definition foo {A} `{Contr A} : A. +Proof. + apply center. + Undo. + (* Ensure the constraints are solved indepentently, otherwise a frozen ?A + makes a search for Contr ?A fail when finishing to apply (fun x => x) *) + apply (fun x => x), center. + +(* Toplevel input, characters 7-17: +Error: +Unable to satisfy the following constraints: +In environment: +A : Type +H : Contr A + +?A : "Type" +?Contr : "Contr ?X8" + + *) \ No newline at end of file -- cgit v1.2.3