wing
wing copied to clipboard
Assigning Json value to a struct's Array field
I tried this:
struct A {
x: Array<str>;
}
let a = A{x: {p:"4"}};
log(a.x[0]);
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
- Please vote by adding a 👍 reaction to the issue to help us prioritize.
- If you are interested to work on this issue, please leave a comment.