-
Notifications
You must be signed in to change notification settings - Fork 196
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
feat(compiler): structural typing for known json objects #3729
Conversation
…n-struct-inference
…n-struct-inference
Signed-off-by: monada-bot[bot] <monabot@monada.co>
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.
Awesome stuff!
…n-struct-inference
…n-struct-inference
…n-struct-inference
Signed-off-by: monada-bot[bot] <monabot@monada.co>
…n-struct-inference
Signed-off-by: monada-bot[bot] <monabot@monada.co>
…n-struct-inference
…n-struct-inference
…n-struct-inference
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.
Nicely done 👍
…n-struct-inference
Thanks for contributing, @MarkMcCulloh! This PR will now be added to the merge queue, or immediately merged if mark/json-struct-inference is up-to-date with main and the queue is empty. |
Congrats! 🚀 This was released in Wing 0.25.21. |
Fixes #3697 (it seemed easier to do it this way than to special case adding the struct name)
Fixes #2366
Fixes #2597
Fixes #3848
Mostly putting this up in case anyone wants to see the spec change. The code needs cleanup and a few more test cases need to be added. (it works though!)
The main complications here are due to my recent inference changes, otherwise the implementation is pretty straightforward.
Completions inside Json literals also work like structs if they are being used as a struct.
Misc:
if let
if let
did not do inference properlyBy submitting this pull request, I confirm that my contribution is made under the terms of the Wing Cloud Contribution License.