Debian Codegraph @

test-suite/bugs/bug_3672.v

raw
1 Set Primitive Projections. (* No failures without this option. *)
2
3 Record AT :=
4 { atype :> Type
5 ; coerce : atype -> Type
6 }.
7 Coercion coerce : atype >-> Sortclass.
8
9 Record Ar C (A:AT) := { ar : forall (X Y : C), A }.
10
11 Definition t := forall C A a X, coerce _ (ar C A a X X).
12 Definition t' := forall C A a X, ar C A a X X.
13
14 (* The command has indeed failed with message:
15 => Error: The term "ar C A a X X" has type "atype A" which is not a (co-)inductive type.
16 *)
17
18 Record Ar2 C (A:AT) :=
19 { ar2 : forall (X Y : C), A
20 ; id2 : forall X, coerce _ (ar2 X X) }.
21
22 Record Ar3 C (A:AT) :=
23 { ar3 : forall (X Y : C), A
24 ; id3 : forall X, ar3 X X }.
25 (* The command has indeed failed with message:
26 => Anomaly: Bad recursive type. Please report.
27 *)