Skip to content

Conversation

@kerams
Copy link
Contributor

@kerams kerams commented Nov 10, 2023

Fixes #16237.

I'm not happy with this solution. I tried to put similar code into TransformAstForNestedUpdates, but the record checking functions create intermediary bindings too, so then I ended up with duplicates. This works, but feel free to refactor.

@kerams kerams requested a review from a team as a code owner November 10, 2023 17:25
Copy link
Member

@vzarytovskii vzarytovskii left a comment

Choose a reason for hiding this comment

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

Nice, thanks

@edgarfgp
Copy link
Contributor

This is not necessarily related to this PR but I have been chasing an compiler internal error when reporting duplicated fields in nested anon records and I have chased to this line. Without doing |> Array.distinctBy (fst >> textOfId) the error reporting cascades properly. I was wondering if you happen to know we can avoid the Array.distinctBy (fst >> textOfId) at that point to have a better error reporting for nested anon records .

@auduchinok
Copy link
Member

@kerams Do you know if there are any tests for reported symbols that cover these cases? It would be nice to assert that we still report usages of the symbols in the nested expressions correctly.

@kerams
Copy link
Contributor Author

kerams commented Nov 13, 2023

A couple have been added in #15699

@psfinaki
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@vzarytovskii
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@T-Gro T-Gro merged commit 75cd8c7 into dotnet:main Nov 13, 2023
@kerams kerams deleted the r branch November 13, 2023 18:00
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.

Compilation error from nested record field update

6 participants