-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Golang: fix flow from a map value via a range statement #15613
Golang: fix flow from a map value via a range statement #15613
Conversation
DCA: no changes. |
Good catch! |
Found the additional change needed to make this work for a stateful map -- the case I'd fixed previously was the case of a map literal, where the literal node is its own post-update node. Also added a test as requested. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion for improvement: also have a test for a map literal.
@owen-mc done, please re-approve |
Flow such as the following was broken:
This is because the store-step relating to the map store used content-kind "map.value", while the read via the range statement used content-kind "array".
Note the case for reading array content now always constrains the read node to have array or slice type, as array content was previously being read from the base over a range statement iterating over a map.