aboutsummaryrefslogtreecommitdiffhomepage
path: root/test-suite/success/polymorphism.v
diff options
context:
space:
mode:
authorGravatar Gaëtan Gilbert <gaetan.gilbert@skyskimmer.net>2017-09-16 14:05:52 +0200
committerGravatar Gaëtan Gilbert <gaetan.gilbert@skyskimmer.net>2017-11-24 19:18:56 +0100
commit02e6d7f39e3dc2aa8859274bc69b2edf8cc91feb (patch)
tree1e87759e8a573c9e5b83f6179f69309800936577 /test-suite/success/polymorphism.v
parent4eb6d29d1ca7e0cc28d59d19a50adb83f7b30a2a (diff)
restrict_universe_context: do not prune named universes.
Diffstat (limited to 'test-suite/success/polymorphism.v')
-rw-r--r--test-suite/success/polymorphism.v13
1 files changed, 13 insertions, 0 deletions
diff --git a/test-suite/success/polymorphism.v b/test-suite/success/polymorphism.v
index 00cab744e..930c16517 100644
--- a/test-suite/success/polymorphism.v
+++ b/test-suite/success/polymorphism.v
@@ -401,6 +401,19 @@ Module Anonymous.
End Anonymous.
+Module Restrict.
+ (* Universes which don't appear in the term should be pruned, unless they have names *)
+ Set Universe Polymorphism.
+
+ Definition dummy_pruned@{} : nat := ltac:(let x := constr:(Type) in exact 0).
+
+ Definition named_not_pruned@{u} : nat := 0.
+ Check named_not_pruned@{_}.
+
+ Definition named_not_pruned_nonstrict : nat := ltac:(let x := constr:(Type@{u}) in exact 0).
+ Check named_not_pruned_nonstrict@{_}.
+End Restrict.
+
Module F.
Context {A B : Type}.
Definition foo : Type := B.