Skip to content

doc for identifier in let definition is not found - regression #1540

@ulugbekna

Description

@ulugbekna

Documentation for the identifier in a let definition is not found (but if the identifier is used later, the doc is still found.

Before:

./ocamlmerlin single document -position 2:5 -filename test.ml <<EOF
(** whatever *)
let id () = ()
EOF
{"class":"return","value":"whatever","notifications":[],"timing":{"clock":20,"cpu":4,"query":1,"pp":0,"reader":0,"ppx":0,"typer":2,"error":0}}

After 762e8bf (according to git bisect)

./ocamlmerlin single document -position 2:5 -filename test.ml <<EOF
(** whatever *)
let id () = ()
EOF
{"class":"return","value":"No documentation available","notifications":[],"timing":{"clock":20,"cpu":4,"query":1,"pp":0,"reader":0,"ppx":0,"typer":2,"error":0}}

./ocamlmerlin single document -position 4:10 -filename test.ml <<EOF
(** whatever *)
let id () = ()

let () = id ()
EOF
{"class":"return","value":"whatever","notifications":[],"timing":{"clock":26,"cpu":5,"query":2,"pp":0,"reader":0,"ppx":0,"typer":3,"error":0}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions