diff options
| author | Hugo Herbelin | 2019-05-06 00:35:56 +0200 |
|---|---|---|
| committer | Hugo Herbelin | 2019-05-06 00:35:56 +0200 |
| commit | 23cd71a9d75e8307b0d85e9e287706cbc7b96ae9 (patch) | |
| tree | 98f97a57971738fc4ca7da54f00b389ae016434e /checker | |
| parent | 01f2816cb72a4c94a162f76d6bfad92f906e2630 (diff) | |
Coqchk: encapsulating an anomaly NotConvertible into a proper typing error.
Detected incidentally in "validate" check for #8893.
Diffstat (limited to 'checker')
| -rw-r--r-- | checker/mod_checking.ml | 3 |
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 = |
