diff options
| -rw-r--r-- | kernel/inductive.ml | 5 | ||||
| -rw-r--r-- | test-suite/bugs/closed/bug_10903.v | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/kernel/inductive.ml b/kernel/inductive.ml index fdd09436d4..2966acae45 100644 --- a/kernel/inductive.ml +++ b/kernel/inductive.ml @@ -1124,9 +1124,10 @@ let inductive_of_mutfix env ((nvect,bodynum),(names,types,bodies as recdef)) = | _ -> raise_err env i NotEnoughAbstractionInFixBody in let ((ind, _), _) as res = check_occur fixenv 1 def in - let _, ind = lookup_mind_specif env ind in + let _, mip = lookup_mind_specif env ind in (* recursive sprop means non record with projections -> squashed *) - if Sorts.Irrelevant == ind.mind_relevance + if mip.mind_relevance == Sorts.Irrelevant && + not (Environ.is_type_in_type env (GlobRef.IndRef ind)) then begin if names.(i).Context.binder_relevance == Sorts.Relevant diff --git a/test-suite/bugs/closed/bug_10903.v b/test-suite/bugs/closed/bug_10903.v new file mode 100644 index 0000000000..3da63dfbb0 --- /dev/null +++ b/test-suite/bugs/closed/bug_10903.v @@ -0,0 +1,3 @@ +(* -*- coq-prog-args: ("-type-in-type"); -*- *) + +Inductive Ind : SProp := C : Ind -> Ind. |
