aboutsummaryrefslogtreecommitdiff
path: root/test-suite
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2020-03-17 18:33:49 +0100
committerPierre-Marie Pédrot2020-03-17 18:39:51 +0100
commitca91aa115378ec24a5be34ba506b071b4662df4b (patch)
treee6e5af9b33428e29040ba532f005e99f5297e497 /test-suite
parentb08ac5ac52f6ed361a3153b4efd4705bc4a172bc (diff)
Properly thread let-bindings in Funind principle construction.
Fixes #11846: Funind fails to generate principles for terms with let bindings.
Diffstat (limited to 'test-suite')
-rw-r--r--test-suite/bugs/closed/bug_11846.v16
1 files changed, 16 insertions, 0 deletions
diff --git a/test-suite/bugs/closed/bug_11846.v b/test-suite/bugs/closed/bug_11846.v
new file mode 100644
index 0000000000..53517e7703
--- /dev/null
+++ b/test-suite/bugs/closed/bug_11846.v
@@ -0,0 +1,16 @@
+Require Import FunInd.
+
+Inductive tree : Type :=
+| Node : unit -> tree.
+
+Definition height (s : tree) : unit :=
+match s with
+| Node h => h
+end.
+
+Definition bal : forall l, let h := height l in tree := fun l =>
+ let h := height l in
+ Node h.
+
+Set Warnings "+all".
+Functional Scheme bal_ind := Induction for bal Sort Prop.