Skip to content

Doc comment syntax (/** */) is not working when attached to recursive modules #6598

Closed
@cannorin

Description

@cannorin

The doc comment syntax (/** */) is not working when attached to the recursive modules starting with and:

/** A */
module rec A : { type t } = {
  type t
}

/** B */ //<- offending line
and B : { type t } = {
  type t
}

It produces the following error:

[E] Line 6, column 0:

Did you forget to attach `res.doc` to an item?
  Standalone attributes start with `@@` like: `@@res.doc`

I think there is a bug in the syntax side since the following code is working correctly:

/** A */
module rec A : { type t } = {
  type t
} 

@res.doc("B")
and B : { type t } = {
  type t
}

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