-
Notifications
You must be signed in to change notification settings - Fork 1k
reflect: add TypeAssert #5160
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
reflect: add TypeAssert #5160
Conversation
|
Hm, I can always flip it to the less optimal version if I don't figure out the deal here; perhaps the pointer arithmetic done in big Go does not apply to tinygo |
dgryski
left a comment
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.
LGTM. Just needs to skip the panic test on wasi.
0a69cba to
77bb092
Compare
77bb092 to
67b8d02
Compare
dgryski
left a comment
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.
LGTM
I guess I should just log and return instead. |
67b8d02 to
9290ab5
Compare
dgryski
left a comment
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.
LGTM
|
Thanks for the addition @jakebailey and to @dgryski for doing the reviewing. Now merging. |
This function was missing, leading to:
I ported the (theoreticlaly faster) reflectlite version of this, rather than just doing
v.Interface().(T), and copied the tests. I am not sure what's typical for this.