diff options
| author | Matthieu Sozeau | 2020-11-27 15:21:29 +0100 |
|---|---|---|
| committer | Matthieu Sozeau | 2020-11-27 18:27:03 +0100 |
| commit | d1fe597eee63caccd50d4a6da529856f295872be (patch) | |
| tree | e0c43f29d608070b0226c90bd55f4b91187e4b3b /test-suite | |
| parent | 0501761b95f4fd3e22b93aa6bce8c9f96b88495b (diff) | |
[kernel] Fix #13495: incompleteness in cases typing for cumulative inductive types
Diffstat (limited to 'test-suite')
| -rw-r--r-- | test-suite/bugs/closed/bug_13495.v | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test-suite/bugs/closed/bug_13495.v b/test-suite/bugs/closed/bug_13495.v new file mode 100644 index 0000000000..489574b854 --- /dev/null +++ b/test-suite/bugs/closed/bug_13495.v @@ -0,0 +1,18 @@ +Universe u. +(* Constraint Set < u. *) +Polymorphic Cumulative Record pack@{u} := Pack { pack_type : Type@{u} }. +(* u is covariant *) + +Polymorphic Definition pack_id@{u} (p : pack@{u}) : pack@{u} := + match p with + | Pack T => Pack T + end. +Definition packid_nat (p : pack@{Set}) := pack_id@{u} p. +(* No constraints: Set <= u *) + +Definition sr_dont_break := Eval compute in packid_nat. +(* Incorrect elimination of "p" in the inductive type "pack": + ill-formed elimination predicate. + + This is because it tries to enforce Set = u + *) |
