Debian Codegraph @

test-suite/bugs/bug_3115.v

raw
1 Axioms A B : Type -> Type.
2 Axiom f : A nat -> B Type.
3
4 Definition A' := A nat.
5 Definition f' : A' -> B Type := f.
6 Coercion f' : A' >-> B.
7 Check (_ : A nat) : A'.
8 Fail Check (_ : A nat) : B Type. (* The term "?11:A nat" has type "A nat" while it is expected to have type "B Type". *)
9 Check ((_ : A nat) : A') : B Type. (* ((?11:A nat):A'):B Type *)
10
11 Fail Identity Coercion f'_id : A >-> A'. (* Error: in build_id_coercion: A must be a transparent constant. *)
12 Identity Coercion f'_id : A' >-> A.
13
14 Fail Check (_ : A nat) : B Type. (* The term "?11:A nat" has type "A nat" while it is expected to have type "B Type". *)
15
16 Coercion f : A >-> B. (* Warning: f does not respect the uniform inheritance condition *)
17
18 Check (_ : A nat) : B Type. (* Anomaly: apply_coercion_args. Please report. *)