aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2017-08-28 01:27:19 +0200
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2017-08-29 17:20:40 +0200
commit4bbe2e4e2a9d5dea1a07f8cf0d7e3aeeed609201 (patch)
treed1cce37d079076c0eb2808fea2a33b38da17cc83
parent5fb53743cc14047b4be12c188c21c6f679bdbd8f (diff)
Properly handling parameters of primitive projections in cctac.
-rw-r--r--plugins/cc/cctac.ml3
-rw-r--r--test-suite/bugs/closed/5697.v9
2 files changed, 11 insertions, 1 deletions
diff --git a/plugins/cc/cctac.ml b/plugins/cc/cctac.ml
index 11d3a6d1f..5a4c52456 100644
--- a/plugins/cc/cctac.ml
+++ b/plugins/cc/cctac.ml
@@ -84,7 +84,8 @@ let rec decompose_term env sigma t=
| Proj (p, c) ->
let canon_const kn = Constant.make1 (Constant.canonical kn) in
let p' = Projection.map canon_const p in
- (Appli (Symb (Term.mkConst (Projection.constant p')), decompose_term env sigma c))
+ let c = Retyping.expand_projection env sigma p' c [] in
+ decompose_term env sigma c
| _ ->
let t = Termops.strip_outer_cast sigma t in
if closed0 sigma t then Symb (EConstr.to_constr sigma t) else raise Not_found
diff --git a/test-suite/bugs/closed/5697.v b/test-suite/bugs/closed/5697.v
index a17229aaf..c653f992a 100644
--- a/test-suite/bugs/closed/5697.v
+++ b/test-suite/bugs/closed/5697.v
@@ -8,3 +8,12 @@ intros.
intros H'.
congruence.
Qed.
+
+Record bar (A : Type) : Type := Bar { bar_car: A }.
+
+Goal forall x y : nat, x <> y -> Bar nat x <> Bar nat y.
+Proof.
+intros.
+intros H'.
+congruence.
+Qed.