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

Fix multiple line type expression with dotget idempotency #3133

Merged
merged 2 commits into from
Oct 29, 2024

Conversation

Leaxe
Copy link
Contributor

@Leaxe Leaxe commented Oct 28, 2024

Fixes #3132

I don't fully understand the mechanism behind this idempotency problem, but it seems to only happen with a LeadingSimpleChain of length one, followed by a DotGet call. I changed the logic of printing multi-line leading chains to match how it is done if there are no links that follow the leading chain.

Please let me know if this change makes sense! I tested it to the best of my ability but I am not totally familiar with FSharp syntax and fantomas formatting guidelines.

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.

Hi @Leaxe, thank you for this PR!
Your fix was close, the key problem was the additional newline introduces by the empty list.

There should be a new version publish shortly after this is merged!

@nojaf nojaf enabled auto-merge (squash) October 29, 2024 08:13
@nojaf nojaf merged commit b7dca79 into fsprojects:main Oct 29, 2024
5 checks passed
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.

Idempotency problem when calling multi-line discriminated union with generic type parameter
2 participants