Debian Codegraph @

test-suite/success/LocalDefinition.v

raw
1 (* Test consistent behavior of Local Definition (#8722) *)
2
3 (* Test consistent behavior of Local Definition wrt Admitted *)
4
5 Module TestAdmittedVisibility.
6 Module A.
7 #[warning="declaration-outside-section"] Let a1 : nat. Admitted. (* Suppose to behave like a "Local Definition" *)
8 Local Definition b1 : nat. Admitted. (* Told to be a "Local Definition" *)
9 Local Definition c1 := 0.
10 Local Parameter d1 : nat.
11 Section S.
12 Let a2 : nat. Admitted. (* Told to be turned into a toplevel assumption *)
13 Local Definition b2 : nat. Admitted. (* Told to be a "Local Definition" *)
14 Local Definition c2 := 0.
15 Local Parameter d2 : nat.
16 End S.
17 End A.
18 Import A.
19 Fail Check a1. (* used to be accepted *)
20 Fail Check b1. (* used to be accepted *)
21 Fail Check c1.
22 Fail Check d1.
23 Fail Check a2. (* used to be accepted *)
24 Fail Check b2. (* used to be accepted *)
25 Fail Check c2.
26 Fail Check d2.
27 End TestAdmittedVisibility.
28
29 Module TestVariableAsInstances.
30 Class U.
31 Local Parameter b : U.
32 Fail Definition testU := _ : U. (* _ unresolved *)
33
34 Class T.
35 #[warning="declaration-outside-section"] Variable a : T. (* warned to be the same as "Local Parameter" thus should not be an instance *)
36 Fail Definition testT := _ : T. (* used to succeed *)
37 End TestVariableAsInstances.