Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
cannorin opened this issue Feb 1, 2024 · 1 comment · Fixed by #6613
Closed

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

cannorin opened this issue Feb 1, 2024 · 1 comment · Fixed by #6613
Labels

Comments

@cannorin
Copy link
Contributor

cannorin commented Feb 1, 2024

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
}
@zth
Copy link
Collaborator

zth commented Feb 6, 2024

Closed in #6613

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants