| 1 |
Set Primitive Projections. |
| 2 |
Record Foo := { bar : Set }. |
| 3 |
Class Baz (F : Foo) := { qux : F.(bar) }. |
| 4 |
Coercion qux : Baz >-> bar. |
| 5 |
|
| 6 |
Definition f : Foo := {| bar := nat |}. |
| 7 |
Canonical Structure f. |
| 8 |
Check (fun b : Baz f => b : _.(bar)). |
| 9 |
|
| 10 |
(* Error: Found target class bar instead of bar. *) |