-
Notifications
You must be signed in to change notification settings - Fork 78
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
fix!(slice): array type def #1246
Conversation
bf63c1f
to
9fc52a0
Compare
9fc52a0
to
6f34875
Compare
@@ -1,5 +1,4 @@ | |||
# result: { "array": { }, "array_unknown_infinite": { "object": { "foo": { "object": { "a": { "bytes": true, "integer": true } } } }, "undefined": true } } | |||
|
|||
# result: { "array": { "0": { "object": { "foo": { "object": { "a": { "integer": true } } } } }, "1": { "object": { "foo": { "object": { "a": { "bytes": true } } } } } } } |
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.
Is this right? Why is there a 1
index too?
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.
If you expand the whole file:
a = []
a[0] = {"foo": {"a": 1}}
a[1] = {"foo": {"a": "bytes"}}
PS Just noticed the _x
which looks like a no-op.
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.
Doh, I missed that there was more to this file 🤦
@@ -1,5 +1,4 @@ | |||
# result: { "array": { }, "array_unknown_infinite": { "object": { "foo": { "object": { "a": { "bytes": true, "integer": true } } } }, "undefined": true } } | |||
|
|||
# result: { "array": { "0": { "object": { "foo": { "object": { "a": { "integer": true } } } } }, "1": { "object": { "foo": { "object": { "a": { "bytes": true } } } } } } } |
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.
Doh, I missed that there was more to this file 🤦
Summary
Change Type
Is this a breaking change?
How did you test this PR?
Does this PR include user facing changes?
our guidelines.
Checklist
run
dd-rust-license-tool write
and commit the changes. More details here.References
slice
causes loss of type information #363 (comment)