summaryrefslogtreecommitdiff
path: root/pretyping/pretyping.ml
diff options
context:
space:
mode:
authorGravatar Stephane Glondu <steph@glondu.net>2011-04-19 16:52:57 +0200
committerGravatar Stephane Glondu <steph@glondu.net>2011-04-19 16:52:57 +0200
commit7a24ebd7506f927a6493d065b8c9c297afd08db3 (patch)
tree3ee6d9c9aa5fc6cf6f793c1fb1a37c2307fd0287 /pretyping/pretyping.ml
parent4b1c150e26881501db9aa944df6406150fc0670d (diff)
parentaa33547c764a229e22d323ca213d46ea221b903e (diff)
Merge commit 'upstream/8.3.pl2+dfsg'
Diffstat (limited to 'pretyping/pretyping.ml')
-rw-r--r--pretyping/pretyping.ml7
1 files changed, 5 insertions, 2 deletions
diff --git a/pretyping/pretyping.ml b/pretyping/pretyping.ml
index 1c17ff88..b8dc719b 100644
--- a/pretyping/pretyping.ml
+++ b/pretyping/pretyping.ml
@@ -6,7 +6,7 @@
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
-(* $Id: pretyping.ml 13408 2010-09-11 19:19:04Z herbelin $ *)
+(* $Id: pretyping.ml 13780 2011-01-07 16:37:57Z herbelin $ *)
open Pp
open Util
@@ -634,7 +634,10 @@ module Pretyping_F (Coercion : Coercion.S) = struct
let cty = nf_evar !evdref cj.uj_type and tval = nf_evar !evdref tj.utj_val in
let cj = match k with
| VMcast when not (occur_existential cty || occur_existential tval) ->
- ignore (Reduction.vm_conv Reduction.CUMUL env cty tval); cj
+ (try ignore (Reduction.vm_conv Reduction.CUMUL env cty tval); cj
+ with Reduction.NotConvertible ->
+ error_actual_type_loc loc env !evdref cj tval)
+
| _ -> inh_conv_coerce_to_tycon loc env evdref cj (mk_tycon tval)
in
let v = mkCast (cj.uj_val, k, tval) in