test-suite/bugs/bug_3495.v
raw| 1 | Require Import RelationClasses. |
| 2 | |
| 3 | Axiom R : Prop -> Prop -> Prop. |
| 4 | #[export] Declare Instance R_refl : Reflexive R. |
| 5 | |
| 6 | Class bar := { x : False }. |
| 7 | Record foo := { a : Prop ; b : bar }. |
| 8 | |
| 9 | Definition default_foo (a0 : Prop) `{b : bar} : foo := {| a := a0 ; b := b |}. |
| 10 | |
| 11 | Goal exists k, R k True. |
| 12 | Proof. |
| 13 | eexists. |
| 14 | evar (b : bar). |
| 15 | let e := match goal with |- R ?e _ => constr:(e) end in |
| 16 | unify e (a (default_foo True)). |
| 17 | subst b. |
| 18 | reflexivity. |
| 19 | Abort. |