(* This bug report actually revealed two bugs in the reconstruction of a term with "match" in the vm *)
(* A simplified form of the first problem *)
(* Reconstruction of terms normalized with vm when a constructor has *)
(* let-ins arguments *)
Record A : Type := C { a := 0 : nat; b : a=a }.
Goal forall d:A, match d with C a b => b end = match d with C a b => b end.
intro.
vm_compute.
(* Now check that it is well-typed *)
match goal with |- ?c = _ => first [let x := type of c in idtac | fail 2] end.
Abort.
(* A simplified form of the second problem *)
Parameter P : nat -> Type.
Inductive box A := Box : A -> box A.

Axiom com : {m : nat & box (P m) }.