diff options
-rw-r--r-- | checker/indtypes.ml | 2 | ||||
-rw-r--r-- | test-suite/coqchk/cumulativity.v | 11 |
2 files changed, 11 insertions, 2 deletions
diff --git a/checker/indtypes.ml b/checker/indtypes.ml index 2716489a4..cc3493aa2 100644 --- a/checker/indtypes.ml +++ b/checker/indtypes.ml @@ -573,7 +573,7 @@ let check_subtyping mib paramsctxt env_ar inds = let check_inductive env kn mib = Flags.if_verbose Feedback.msg_notice (str " checking ind: " ++ MutInd.print kn); (* check mind_constraints: should be consistent with env *) - let env = Environ.push_context (Univ.instantiate_univ_context mib.mind_universes) env in + let env = Environ.push_context (Univ.instantiate_univ_context (Univ.UInfoInd.univ_context mib.mind_universes)) env in (* check mind_record : TODO ? check #constructor = 1 ? *) (* check mind_finite : always OK *) (* check mind_ntypes *) diff --git a/test-suite/coqchk/cumulativity.v b/test-suite/coqchk/cumulativity.v index 3a8f9fa22..ecf9035bf 100644 --- a/test-suite/coqchk/cumulativity.v +++ b/test-suite/coqchk/cumulativity.v @@ -49,4 +49,13 @@ Section TpLower. Fail Definition LowerTp : Tp@{j} -> Tp@{i} := fun x => x. -End TpLower.
\ No newline at end of file +End TpLower. + + +Section subtyping_test. + Universe i j. + Constraint i < j. + + Inductive TP2 := tp2 : Type@{i} -> Type@{j} -> TP2. + +End subtyping_test.
\ No newline at end of file |