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

Type parameter comment lost in formatting #2052

Closed
3 tasks
bent-rasmussen opened this issue Jan 31, 2022 · 4 comments · Fixed by #2053
Closed
3 tasks

Type parameter comment lost in formatting #2052

bent-rasmussen opened this issue Jan 31, 2022 · 4 comments · Fixed by #2053

Comments

@bent-rasmussen
Copy link

Issue created from fantomas-online

Code

let Foo<'T (* TODO *)> () = ()

Result

let Foo<'T> () = ()

Problem description

Fantomas lost a comment inside a type parameter list/constraint section. Granted this is probably a rare place to put a comment. Perhaps there should be a general test case to check for loss of comment strings in the transformation.

Extra information

  • The formatted result breaks by code.
  • The formatted result gives compiler warnings.
  • I or my company would be willing to help fix this.
nojaf added a commit to nojaf/fantomas that referenced this issue Feb 1, 2022
@nojaf
Copy link
Contributor

nojaf commented Feb 1, 2022

Hello, thank you for reporting this issue.
I was able to find a fix for this.

@bent-rasmussen
Copy link
Author

Amazing response time! 👍 It is not critical to me, just noticed the issue. Thanks for fixing it!

@nojaf
Copy link
Contributor

nojaf commented Feb 1, 2022

Thank you for the incentive.

@nojaf
Copy link
Contributor

nojaf commented Feb 1, 2022

Fix available in 4.6.1

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

Successfully merging a pull request may close this issue.

2 participants