diff options
Diffstat (limited to 'toplevel')
| -rw-r--r-- | toplevel/class.ml | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/toplevel/class.ml b/toplevel/class.ml index 1a18e56748..e8e8653c85 100644 --- a/toplevel/class.ml +++ b/toplevel/class.ml @@ -251,12 +251,12 @@ let build_id_coercion idf_opt source = in (* juste pour verification *) let _ = - try - Reductionops.conv_leq env Evd.empty - (Typing.type_of env Evd.empty val_f) typ_f - with _ -> + if not + (Reductionops.is_conv_leq env Evd.empty + (Typing.type_of env Evd.empty val_f) typ_f) + then error ("cannot be defined as coercion - "^ - "maybe a bad number of arguments") + "maybe a bad number of arguments") in let idf = match idf_opt with |
