aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Herbelin2019-05-06 00:35:56 +0200
committerHugo Herbelin2019-05-06 00:35:56 +0200
commit23cd71a9d75e8307b0d85e9e287706cbc7b96ae9 (patch)
tree98f97a57971738fc4ca7da54f00b389ae016434e
parent01f2816cb72a4c94a162f76d6bfad92f906e2630 (diff)
Coqchk: encapsulating an anomaly NotConvertible into a proper typing error.
Detected incidentally in "validate" check for #8893.
-rw-r--r--checker/mod_checking.ml3
1 files changed, 2 insertions, 1 deletions
diff --git a/checker/mod_checking.ml b/checker/mod_checking.ml
index b86d491d72..1dd16f1630 100644
--- a/checker/mod_checking.ml
+++ b/checker/mod_checking.ml
@@ -33,7 +33,8 @@ let check_constant_declaration env kn cb =
match Environ.body_of_constant_body env cb with
| Some bd ->
let j = infer env' (fst bd) in
- conv_leq env' j.uj_type ty
+ (try conv_leq env' j.uj_type ty
+ with NotConvertible -> Type_errors.error_actual_type env j ty)
| None -> ()
in
let env =