diff --git a/generator/OCaml.ml b/generator/OCaml.ml index 40fd9454f..f0af3ae67 100644 --- a/generator/OCaml.ml +++ b/generator/OCaml.ml @@ -189,7 +189,11 @@ end | Not_deprecated -> () | Replaced_by replacement -> has_tags := true; - pr "\n\n @deprecated Use {!%s} instead" replacement + let f_replacement = Actions.find replacement in + if is_documented f_replacement then + pr "\n\n @deprecated Use {!%s} instead" replacement + else + pr "\n\n @deprecated This is replaced by method %s which is not exported by the OCaml bindings" replacement | Deprecated_no_replacement -> has_tags := true; pr "\n\n @deprecated There is no documented replacement"