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

Parens: some more #17012

Merged
merged 12 commits into from
Apr 10, 2024
Merged

Parens: some more #17012

merged 12 commits into from
Apr 10, 2024

Conversation

brianrourkeboll
Copy link
Contributor

@brianrourkeboll brianrourkeboll commented Apr 9, 2024

Another followup to #16079.

Description

  • Keep parens for prefix & infix operator applications in record copy expressions.
  • Treat arrow-sensitive constructs (e.g., constructs with trailing types) more consistently.
  • Bare typed expressions are not allowed in record bindings.
  • Keep parens around () (i.e., (())) in function/method invocations, since we cannot know purely from the syntax whether double parens are required.
  • Handle method application chains that depend on pseudo-dot precedence.
  • Add a space around identifiers beginning or ending with an underscore.
  • Keep parens around hanging tuples (multiline tuples whose first line is indented farther than a subsequent line).
  • Handle some simple cases of The code fix alignment problem #16999 (for patterns).

With a VSIX that includes these changes and #16977, I can apply the parens code fix to VisualFSharp.sln with no new warnings or errors, with the sole exception of some instances of #16987.

Checklist

  • Test cases added.
  • Release notes entry updated.

Copy link
Contributor

github-actions bot commented Apr 9, 2024

❗ Release notes required


✅ Found changes and release notes in following paths:

Change path Release notes path Description
src/Compiler docs/release-notes/.FSharp.Compiler.Service/8.0.300.md
vsintegration/src docs/release-notes/.VisualStudio/17.10.md

@brianrourkeboll brianrourkeboll marked this pull request as ready for review April 9, 2024 13:15
@brianrourkeboll brianrourkeboll requested a review from a team as a code owner April 9, 2024 13:15
Copy link
Member

@psfinaki psfinaki left a comment

Choose a reason for hiding this comment

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

Thanks!

@psfinaki psfinaki merged commit 253c6a6 into dotnet:main Apr 10, 2024
32 checks passed
@brianrourkeboll brianrourkeboll deleted the parens-some-more branch April 10, 2024 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants