Skip to content

Consolidate SynExpr.LetOrUseBang(isUse= true) #18472

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

Merged
merged 3 commits into from
Apr 16, 2025

Conversation

edgarfgp
Copy link
Contributor

@edgarfgp edgarfgp commented Apr 13, 2025

Description

While investigating/fixing #16343 the related logic was hard to follow because the use! cases where split into multiple match clauses.

This PR:

  • Unifies the SynExpr.LetOrUseBang(isUse = true) logic in to a single case.

  • Adds a requireBuilderMethod function

    • Checks if a builder method exists and reports an error if it doesn't
    • Removing a lot duplicated checks.

Checklist

  • Test cases added
  • Release notes entry updated

@edgarfgp edgarfgp changed the title Consolidated two SynExpr.LetOrUseBang patterns with isUse = true Consolidate two SynExpr.LetOrUseBang patterns with isUse = true Apr 13, 2025
Copy link
Contributor

github-actions bot commented Apr 13, 2025

⚠️ Release notes required, but author opted out

Warning

Author opted out of release notes, check is disabled for this pull request.
cc @dotnet/fsharp-team-msft

@edgarfgp edgarfgp changed the title Consolidate two SynExpr.LetOrUseBang patterns with isUse = true Consolidate SynExpr.LetOrUseBang(isUse = true) Apr 13, 2025
@edgarfgp edgarfgp added the NO_RELEASE_NOTES Label for pull requests which signals, that user opted-out of providing release notes label Apr 13, 2025
@edgarfgp edgarfgp marked this pull request as ready for review April 14, 2025 14:39
@edgarfgp edgarfgp requested a review from a team as a code owner April 14, 2025 14:39
@edgarfgp edgarfgp changed the title Consolidate SynExpr.LetOrUseBang(isUse = true) Consolidate SynExpr.LetOrUseBang(isUse= true) Apr 14, 2025
@T-Gro T-Gro enabled auto-merge (squash) April 16, 2025 13:24
@T-Gro T-Gro merged commit 85ea990 into dotnet:main Apr 16, 2025
33 checks passed
@github-project-automation github-project-automation bot moved this from New to In Progress in F# Compiler and Tooling Apr 16, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Done in F# Compiler and Tooling Apr 16, 2025
T-Gro added a commit that referenced this pull request Apr 24, 2025
* Consolidated two `SynExpr.LetOrUseBang` patterns with `isUse = true` (#18472)

* `and!` support in TaskBulder (#18451)

* Update package Category (#18479)

* Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20250423.3 (#18494)

Microsoft.SourceBuild.Intermediate.source-build-reference-packages
 From Version 9.0.0-alpha.1.25209.1 -> To Version 9.0.0-alpha.1.25223.3

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>

---------

Co-authored-by: Edgar Gonzalez <[email protected]>
Co-authored-by: Vladimir Shchur <[email protected]>
Co-authored-by: Matt Mitchell <[email protected]>
Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NO_RELEASE_NOTES Label for pull requests which signals, that user opted-out of providing release notes
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants