aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/funind/indfun.ml4
-rw-r--r--test-suite/bugs/closed/5618.v9
2 files changed, 11 insertions, 2 deletions
diff --git a/plugins/funind/indfun.ml b/plugins/funind/indfun.ml
index 35f0929587..2c5dae1cde 100644
--- a/plugins/funind/indfun.ml
+++ b/plugins/funind/indfun.ml
@@ -593,7 +593,7 @@ and rebuild_nal aux bk bl' nal typ =
| na::nal,{ CAst.v = CProdN((na'::nal',bk',nal't)::rest,typ') } ->
if Name.equal (snd na) (snd na') || Name.is_anonymous (snd na')
then
- let assum = CLocalAssum([na],bk',nal't) in
+ let assum = CLocalAssum([na],bk,nal't) in
let new_rest = if nal' = [] then rest else ((nal',bk',nal't)::rest) in
rebuild_nal
(assum::aux)
@@ -602,7 +602,7 @@ and rebuild_nal aux bk bl' nal typ =
nal
(CAst.make @@ CProdN(new_rest,typ'))
else
- let assum = CLocalAssum([na'],bk',nal't) in
+ let assum = CLocalAssum([na'],bk,nal't) in
let new_rest = if nal' = [] then rest else ((nal',bk',nal't)::rest) in
rebuild_nal
(assum::aux)
diff --git a/test-suite/bugs/closed/5618.v b/test-suite/bugs/closed/5618.v
new file mode 100644
index 0000000000..ab88a88f44
--- /dev/null
+++ b/test-suite/bugs/closed/5618.v
@@ -0,0 +1,9 @@
+Require Import FunInd.
+
+Function test {T} (v : T) (x : nat) : nat :=
+ match x with
+ | 0 => 0
+ | S x' => test v x'
+ end.
+
+Check R_test_complete. \ No newline at end of file