aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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