aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kernel/inductive.ml2
-rw-r--r--test-suite/success/extraction_polyprop.v11
2 files changed, 12 insertions, 1 deletions
diff --git a/kernel/inductive.ml b/kernel/inductive.ml
index ca814f497c..088b99b9e0 100644
--- a/kernel/inductive.ml
+++ b/kernel/inductive.ml
@@ -214,7 +214,7 @@ let constrained_type_of_inductive_knowing_parameters env ((mib,mip),u as pind) a
(ty, cst)
let type_of_inductive_knowing_parameters env ?(polyprop=false) mip args =
- type_of_inductive_gen env mip args
+ type_of_inductive_gen ~polyprop env mip args
(* The max of an array of universes *)
diff --git a/test-suite/success/extraction_polyprop.v b/test-suite/success/extraction_polyprop.v
new file mode 100644
index 0000000000..7215bd9905
--- /dev/null
+++ b/test-suite/success/extraction_polyprop.v
@@ -0,0 +1,11 @@
+(* The current extraction cannot handle this situation,
+ and shouldn't try, otherwise it might produce some Ocaml
+ code that segfaults. See Table.error_singleton_become_prop
+ or S. Glondu's thesis for more details. *)
+
+Definition f {X} (p : (nat -> X) * True) : X * nat :=
+ (fst p 0, 0).
+
+Definition f_prop := f ((fun _ => I),I).
+
+Fail Extraction f_prop.