diff options
author | Matthieu Sozeau <mattam@mattam.org> | 2016-06-13 18:42:01 +0200 |
---|---|---|
committer | Matthieu Sozeau <mattam@mattam.org> | 2016-06-13 22:54:17 +0200 |
commit | 03a71a241f8d05f6a86f3c8f3c2146c4db378f7b (patch) | |
tree | 10817571fedddc524e2f3a890f97696a0690e7fd /test-suite/bugs/closed/4816.v | |
parent | cbb41129f15623ba5be50026f930e0435c9f5259 (diff) |
Univs: more robust Universe/Constraint decls #4816
This fixes the declarations of constraints, universes
and assumptions:
- global constraints can refer to global universes only,
- polymorphic universes, constraints and assumptions can only be
declared inside sections, when all the section's
variables/universes are polymorphic as well.
- monomorphic assumptions may only be declared in section contexts
which are not parameterized by polymorphic universes/assumptions.
Add fix for part 1 of bug #4816
Diffstat (limited to 'test-suite/bugs/closed/4816.v')
-rw-r--r-- | test-suite/bugs/closed/4816.v | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test-suite/bugs/closed/4816.v b/test-suite/bugs/closed/4816.v new file mode 100644 index 000000000..86597c88f --- /dev/null +++ b/test-suite/bugs/closed/4816.v @@ -0,0 +1,17 @@ +Section foo. +Polymorphic Universes A B. +Fail Constraint A <= B. +End foo. +(* gives an anomaly Universe undefined *) + +Universes X Y. +Section Foo. + Polymorphic Universes Z W. + Polymorphic Constraint W < Z. + + Fail Definition bla := Type@{W}. + Polymorphic Definition bla := Type@{W}. + Section Bar. + Fail Constraint X <= Z. + End Bar. +End Foo. |