-
Notifications
You must be signed in to change notification settings - Fork 181
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
Assigning Json value to a struct's Array field #6448
Comments
5 tasks
mergify bot
pushed a commit
that referenced
this issue
May 16, 2024
#6496) fixes #6448 stractural Json object assignment can only be assigned to wing maps or structs (not arrays). Also fixes the diagnostic hint about using `fromJson` for dynamic json conversion to be shown only for actual dynamic jsons. ## Checklist - [x] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [x] Description explains motivation and solution - [x] Tests added (always) - [ ] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*.
Congrats! 🚀 This was released in Wing 0.73.48. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I tried this:
This happened:
It doesn't throw a compilation error
Error: Index is a number but collection is not an array or string
I expected this:
No response
Is there a workaround?
No response
Anything else?
No response
Wing Version
No response
Node.js Version
No response
Platform(s)
No response
Community Notes
The text was updated successfully, but these errors were encountered: