From 7527312784c7c054e30df9ed57cf891cd98b2aeb Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 3 Mar 2017 08:44:15 +0000 Subject: [PATCH] generator: ocaml: Don't link to undocumented methods. As for the previous commit, don't link to a method if it's not exported by the OCaml bindings. --- generator/OCaml.ml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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"