aboutsummaryrefslogtreecommitdiffhomepage
path: root/kernel/inductive.ml
diff options
context:
space:
mode:
authorGravatar Matthieu Sozeau <matthieu.sozeau@inria.fr>2015-10-01 15:36:57 +0200
committerGravatar Matthieu Sozeau <mattam@mattam.org>2015-10-02 15:54:13 +0200
commitb3d97c2147418f44fc704807d3812b04921591af (patch)
tree695491ad5693218e18e023ac36671c653cf15c71 /kernel/inductive.ml
parentc1630c9dcdf91dc965b3c375d68e3338fb737531 (diff)
Univs: fix bug #4251, handling of template polymorphic constants.
Diffstat (limited to 'kernel/inductive.ml')
-rw-r--r--kernel/inductive.ml5
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/inductive.ml b/kernel/inductive.ml
index 87c139f48..a02d5e205 100644
--- a/kernel/inductive.ml
+++ b/kernel/inductive.ml
@@ -165,7 +165,10 @@ let rec make_subst env =
(* to be greater than the level of the argument; this is probably *)
(* a useless extra constraint *)
let s = sort_as_univ (snd (dest_arity env (Lazy.force a))) in
- make (cons_subst u s subst) (sign, exp, args)
+ if Univ.Universe.is_levels s then
+ make (cons_subst u s subst) (sign, exp, args)
+ else (* Cannot handle substitution by i+n universes. *)
+ make subst (sign, exp, args)
| (na,None,t)::sign, Some u::exp, [] ->
(* No more argument here: we add the remaining universes to the *)
(* substitution (when [u] is distinct from all other universes in the *)