Skip to content

More misc parens fixes#18350

Merged
T-Gro merged 8 commits intodotnet:mainfrom
brianrourkeboll:more-misc-parens
Mar 10, 2025
Merged

More misc parens fixes#18350
T-Gro merged 8 commits intodotnet:mainfrom
brianrourkeboll:more-misc-parens

Conversation

@brianrourkeboll
Copy link
Contributor

@brianrourkeboll brianrourkeboll commented Mar 1, 2025

Description

Checklist

  • Test cases added.
  • Release notes entry updated.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 1, 2025

❗ 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/9.0.300.md

Copy link
Contributor

@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 Brian!

@github-project-automation github-project-automation bot moved this from New to In Progress in F# Compiler and Tooling Mar 10, 2025
@T-Gro T-Gro merged commit a9003e8 into dotnet:main Mar 10, 2025
33 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in F# Compiler and Tooling Mar 10, 2025
@brianrourkeboll brianrourkeboll deleted the more-misc-parens branch March 10, 2025 15:54
github-actions bot pushed a commit to ionide/FsAutoComplete that referenced this pull request Feb 26, 2026
…thod call

Add a checkNotApplicable test verifying that parentheses around a float
literal argument in a chained method call are NOT suggested for removal.

  bg.lighten(0.2).hexa ()  -- parens around 0.2 are necessary

Without the fix (from dotnet/fsharp#18350), removing the parens produces
invalid code: bg.lighten 0.2.hexa ()

The test uses Diagnostics.acceptAll so it remains valid whether or not
FSAC0004 is raised -- it simply asserts the code fix is not offered.

Closes #1362

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
github-actions bot added a commit to ionide/FsAutoComplete that referenced this pull request Mar 9, 2026
The upstream fix from dotnet/fsharp#18350 was included in FCS 43.10.101.
Confirmed: SynExpr.shouldBeParenthesizedInContext now returns true for
float literal arguments in chained method calls, so FSAC0004 is no
longer emitted incorrectly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

unnecessary parentheses analyzer trigger in chained function call

3 participants