Skip to content

Functions that have both type annotation and doc are not shown in the autocomplete window #72

Closed
rescript-lang/rescript-editor-support
#65
@gaku-sei

Description

@gaku-sei

Say we have an ArrayExtra module, and define a function inside like the following:

@ocaml.doc("Hello doc")
let usefulFunction: unit => int = () => 1

Typing ArrayExtra.u will show the following:

Capture d’écran 2021-01-29 à 14 02 29

If I remove the type annotation, or the doc, it works:

Capture d’écran 2021-01-29 à 14 04 12

While I'm aware the syntax for doc will change soon and not use @ocaml.doc anymore, and while I'm also aware that type annotations are optional in many cases, I thought it could be interesting to understand why the function doesn't show up 😕

Edit: My bad, it seems it works for some other functions. So when a function with type annotation + doc appears in the suggestions list, it'll always appear, but some functions don't appear for any reason, and the only to force them to appear is to drop the types for instance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions