Skip to content
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

Comment dropped in constructor parameter list #1872

Closed
pbiggar opened this issue Aug 26, 2021 · 3 comments
Closed

Comment dropped in constructor parameter list #1872

pbiggar opened this issue Aug 26, 2021 · 3 comments

Comments

@pbiggar
Copy link
Contributor

pbiggar commented Aug 26, 2021

Issue created from fantomas-online

Code

  type MyType
    (
      (* some comment *)
    ) = 
    let x = 5

Result

type MyType() =
    let x = 5

Problem description

The comment should not be dropped. This also happens if there are parameters present, but I reduced the test case to remove the parameters as it seems they're dropped regardless. Also happens with //-style comments.

Extra information

Options

Fantomas Master at 08/19/2021 16:27:53 - a80f888

Default Fantomas configuration

@nojaf
Copy link
Contributor

nojaf commented Aug 27, 2021

Somewhere in CodePrinter we are not taking the parenthesis trivia into account.
Are you interested in submitting a PR?

@pbiggar
Copy link
Contributor Author

pbiggar commented Aug 27, 2021

Probably not for this one, it's a low-priority for me

@nojaf
Copy link
Contributor

nojaf commented Jan 2, 2023

Fix available in v5.2.0-beta-001

@nojaf nojaf closed this as completed Jan 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants