-
Notifications
You must be signed in to change notification settings - Fork 946
Add support for handling Interface
in reflect.Type.AssignableTo()
#4277
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
Labels
reflection
Needs further work on reflection
Comments
fxamacker
added a commit
to fxamacker/cbor
that referenced
this issue
Sep 8, 2024
tinygo v0.33 doesn't implement Type.AssignableTo(), which is needed under the hood when decoding registered CBOR tag data to Go interface. More details in tinygo-org/tinygo#4277. This commit returns error of UnmarshalTypeError type when decoding registered CBOR tag data to Go interface. This change can be reverted after tinygo implements Type.AssignalbeTo().
Type.AssignableTo
panics with "reflect: unimplemented: AssignableTo with interface"Interface
in reflect.Type.AssignableTo()
I just hit this, but using plain
|
I believe this work is tracked in #4376. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Some packages like fxamacker/cbor require
Type.AssignableTo
to support Interface.There was some prior discussion at fxamacker/cbor#295 (comment).
Projects using packages that require Interface support can encounter panics from the following code.
tinygo/src/reflect/type.go
Lines 956 to 969 in 6384eca
If a solution becomes available, I can use some existing tests in fxamacker/cbor to help test it.
The text was updated successfully, but these errors were encountered: