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

Checker: fix exception on wrong update syntax in anon records #15638

Merged
merged 3 commits into from
Jul 19, 2023

Conversation

auduchinok
Copy link
Member

Fixes exceptions introduced in #15214 when wrong syntax is used to update an anonymous record:

let f (r: {| A: int |}) =
    { r with A = 1 }

@auduchinok auduchinok requested a review from a team as a code owner July 19, 2023 14:23
@vzarytovskii vzarytovskii enabled auto-merge (squash) July 19, 2023 14:57
@vzarytovskii vzarytovskii merged commit 0f893c3 into dotnet:main Jul 19, 2023
22 checks passed
@KevinRansom
Copy link
Member

nice

@auduchinok auduchinok deleted the tcExpr-record-anonUpdate branch July 19, 2023 17:09
@vzarytovskii
Copy link
Member

/backport to release/dev17.7

@github-actions
Copy link
Contributor

Started backporting to release/dev17.7: https://github.com/dotnet/fsharp/actions/runs/5654806378

@vzarytovskii
Copy link
Member

Backport is needed to resolve merge issues in 17.7 -> main, it won't go into QB.

@github-actions
Copy link
Contributor

@vzarytovskii backporting to release/dev17.7 failed, the patch most likely resulted in conflicts:

$ git am --3way --ignore-whitespace --keep-non-patch changes.patch

Applying: Revert "Fix: 14814 --- Inaccurate error in anonymous record copy-and-update (#15625)"
Applying: Checker: fix exception in wrong anon record update
Using index info to reconstruct a base tree...
M	src/Compiler/Checking/CheckExpressions.fs
M	tests/FSharp.Compiler.ComponentTests/Conformance/Types/RecordTypes/AnonymousRecords.fs
Falling back to patching base and 3-way merge...
Auto-merging tests/FSharp.Compiler.ComponentTests/Conformance/Types/RecordTypes/AnonymousRecords.fs
CONFLICT (content): Merge conflict in tests/FSharp.Compiler.ComponentTests/Conformance/Types/RecordTypes/AnonymousRecords.fs
Auto-merging src/Compiler/Checking/CheckExpressions.fs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0002 Checker: fix exception in wrong anon record update
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

vzarytovskii pushed a commit to vzarytovskii/fsharp that referenced this pull request Jul 25, 2023
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.

4 participants