aboutsummaryrefslogtreecommitdiff
path: root/test-suite
diff options
context:
space:
mode:
authorGaëtan Gilbert2020-03-30 13:34:17 +0200
committerGaëtan Gilbert2020-03-31 14:39:43 +0200
commitfafc731885f84656ec884d40b843aa62a5991025 (patch)
tree5026dc8ace8a778a78fc261522ea78fcf07232ee /test-suite
parent699152de685ba5e2dc05fd6248b17c3139987bb7 (diff)
Include review suggestions
Diffstat (limited to 'test-suite')
-rw-r--r--test-suite/success/InductiveVsImplicitsVsTC.v30
1 files changed, 23 insertions, 7 deletions
diff --git a/test-suite/success/InductiveVsImplicitsVsTC.v b/test-suite/success/InductiveVsImplicitsVsTC.v
index 9b787867fc..a98de32b70 100644
--- a/test-suite/success/InductiveVsImplicitsVsTC.v
+++ b/test-suite/success/InductiveVsImplicitsVsTC.v
@@ -1,10 +1,26 @@
-Class C := {}.
+Module NoConv.
+ Class C := {}.
-Definition useC {c:C} := nat.
+ Definition useC {c:C} := nat.
-Inductive foo {a b : C} := CC : useC -> foo.
-(* If TC search runs before parameter unification it will pick the
- wrong instance for the first parameter.
+ Inductive foo {a b : C} := CC : useC -> foo.
+ (* If TC search runs before parameter unification it will pick the
+ wrong instance for the first parameter.
- useC makes sure we don't completely skip TC search.
-*)
+ useC makes sure we don't completely skip TC search.
+ *)
+End NoConv.
+
+Module ForConv.
+
+ Class Bla := { bla : Type }.
+
+ Instance bli : Bla := { bla := nat }.
+
+ Inductive vs := C : forall x : bla, x = 2 -> vs.
+ (* here we need to resolve TC to pass the conversion problem if we
+ combined with the previous example it would fail as TC resolution
+ for conversion is unrestricted and so would resolve the
+ conclusion too early. *)
+
+End ForConv.