Skip to content

Fix checking nested fields for records#18964

Merged
T-Gro merged 8 commits into
dotnet:mainfrom
evgTSV:fix-nested-fields-copy-update-rec
Oct 20, 2025
Merged

Fix checking nested fields for records#18964
T-Gro merged 8 commits into
dotnet:mainfrom
evgTSV:fix-nested-fields-copy-update-rec

Conversation

@evgTSV

@evgTSV evgTSV commented Oct 3, 2025

Copy link
Copy Markdown
Contributor

Enhance the F# compiler’s type checker to correctly support and validate nested field updates (with depth > 1) for both anonymous and records. Add tests to cover these scenarios, and perform minor refactoring.

Fixes #18940
Fixes #18062

@github-actions

github-actions Bot commented Oct 3, 2025

Copy link
Copy Markdown
Contributor

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

Comment thread src/Compiler/Checking/Expressions/CheckExpressions.fs Outdated
Comment thread tests/FSharp.Compiler.ComponentTests/Language/CopyAndUpdateTests.fs Outdated
Comment thread tests/FSharp.Compiler.ComponentTests/Language/CopyAndUpdateTests.fs Outdated
Comment thread src/Compiler/Checking/Expressions/CheckExpressions.fs Outdated
@evgTSV
evgTSV requested a review from auduchinok October 4, 2025 12:11
@edgarfgp

edgarfgp commented Oct 5, 2025

Copy link
Copy Markdown
Contributor

I think this might also fix #18062 ?

@evgTSV

evgTSV commented Oct 5, 2025

Copy link
Copy Markdown
Contributor Author

Yes, this fixes that issue too

@github-project-automation github-project-automation Bot moved this from New to In Progress in F# Compiler and Tooling Oct 13, 2025
@T-Gro
T-Gro enabled auto-merge (squash) October 13, 2025 08:53
Comment thread src/Compiler/Checking/CheckRecordSyntaxHelpers.fs Outdated
Comment thread src/Compiler/Checking/Expressions/CheckExpressions.fs Outdated
Comment thread src/Compiler/Checking/CheckRecordSyntaxHelpers.fs Outdated
Comment thread src/Compiler/Checking/CheckRecordSyntaxHelpers.fs
auto-merge was automatically disabled October 14, 2025 14:57

Head branch was pushed to by a user without write access

@evgTSV
evgTSV requested review from T-Gro and vzarytovskii October 14, 2025 14:57
@edgarfgp

Copy link
Copy Markdown
Contributor

/run fantomas

@github-actions

Copy link
Copy Markdown
Contributor

🔧 CLI Command Report

  • Command: /run fantomas
  • Outcome: success

✅ Patch applied:
- Files changed: 2
- Lines changed: 43

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.

Nested field update doesn't type-check properly Copy and update record expression doesn't compile when the record comes from a function

6 participants