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

Trivia not restored after long identifier in SynField #2290

Merged
merged 3 commits into from
Jun 7, 2022
Merged

Trivia not restored after long identifier in SynField #2290

merged 3 commits into from
Jun 7, 2022

Conversation

edgarfgp
Copy link
Contributor

@edgarfgp edgarfgp commented Jun 5, 2022

This PR adds a Regression test for #2103 as this is fixed in the upcoming v5

Copy link
Contributor

@nojaf nojaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @edgarfgp, thank you for this contribution.
Could you please add a changelog entry:
https://github.com/fsprojects/fantomas/blob/master/CONTRIBUTING.md#changelog
And could you please try to link the PR to the issue, see:
https://github.com/fsprojects/fantomas/blob/master/CONTRIBUTING.md#pull-request-title

@@ -879,6 +879,25 @@ type Foo = // comment
1
"""

[<Test>]
let ``comment after variants with modules`` () =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add the issue number, please?
comment after variants with modules, 2103

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, that test name isn't really good.
This has nothing to do with modules.
Maybe go for restore trivia after long identifier in SynField.
I'll update the original issue title as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have updated this PR following your suggestions :)

@edgarfgp edgarfgp changed the title Add Regression test for variants with modules lose comments Trivia not restored after long identifier in SynField Jun 7, 2022
CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Contributor

@nojaf nojaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much!

@edgarfgp
Copy link
Contributor Author

edgarfgp commented Jun 7, 2022

My pleasure . Let me know if there is anything else I can help ;)

@nojaf nojaf merged commit deffd73 into fsprojects:master Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants