Debian Codegraph @

test-suite/bugs/bug_9508.v

raw
1 Set Implicit Arguments.
2 Unset Strict Implicit.
3
4 Module OK.
5 Record A := mkA {
6 T : Type;
7 P : T -> bool;
8 }.
9
10 About P. (* Argument a is implicit *)
11 Check P (true: T (mkA negb)).
12 End OK.
13
14 Module KO.
15 Set Primitive Projections.
16 Record A := mkA {
17 T : Type;
18 P : T -> bool;
19 }.
20
21 About P. (* No implicit arguments *)
22 Check P (true: T (mkA negb)).
23 (*
24 The command has indeed failed with message:
25 The term "true : T {| T := bool; P := negb |}" has type "T {| T := bool; P := negb |}"
26 while it is expected to have type "A".
27 *)
28
29 End KO.