aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Matthieu Sozeau <mattam@mattam.org>2014-04-08 16:58:52 +0200
committerGravatar Matthieu Sozeau <mattam@mattam.org>2014-05-06 09:59:00 +0200
commitbe428c80f7be97b80e7e1e58d195a26465407915 (patch)
treedbd54be76014e19b03422d25a2b329c927cdbbe2
parent61a79f62fa860da63e968b04da9935597312c07e (diff)
Refresh some universes in cases.ml as they might appear in the term.
-rw-r--r--pretyping/cases.ml7
-rw-r--r--test-suite/bugs/closed/2615.v2
2 files changed, 8 insertions, 1 deletions
diff --git a/pretyping/cases.ml b/pretyping/cases.ml
index 2b0a2dda9..75ebdeb22 100644
--- a/pretyping/cases.ml
+++ b/pretyping/cases.ml
@@ -1559,6 +1559,7 @@ let abstract_tycon loc env evdref subst _tycon extenv t =
map_constr_with_full_binders push_binder aux x t
| Evar ev ->
let ty = get_type_of env sigma t in
+ let ty = Evarutil.evd_comb1 (refresh_universes false) evdref ty in
let inst =
List.map_i
(fun i _ ->
@@ -1574,7 +1575,11 @@ let abstract_tycon loc env evdref subst _tycon extenv t =
map_constr_with_full_binders push_binder aux x t
| (_, _, u) :: _ -> (* u is in extenv *)
let vl = List.map pi1 good in
- let ty = lift (-k) (aux x (get_type_of env !evdref t)) in
+ let ty =
+ let ty = get_type_of env !evdref t in
+ Evarutil.evd_comb1 (refresh_universes false) evdref ty
+ in
+ let ty = lift (-k) (aux x ty) in
let depvl = free_rels ty in
let inst =
List.map_i
diff --git a/test-suite/bugs/closed/2615.v b/test-suite/bugs/closed/2615.v
index 54e1a07cc..dde6a6a5e 100644
--- a/test-suite/bugs/closed/2615.v
+++ b/test-suite/bugs/closed/2615.v
@@ -12,3 +12,5 @@ Fail induction 1.
refine (fun p => match p with _ => _ end).
Undo.
refine (fun p => match p with foo_intro _ _ => _ end).
+admit.
+Qed. \ No newline at end of file