-
Notifications
You must be signed in to change notification settings - Fork 976
Open
Labels
reflectionNeeds further work on reflectionNeeds further work on reflection
Description
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.
Lines 956 to 969 in 6384eca
func (t *rawType) AssignableTo(u Type) bool { | |
if t == u.(*rawType) { | |
return true | |
} | |
if u.Kind() == Interface && u.NumMethod() == 0 { | |
return true | |
} | |
if u.Kind() == Interface { | |
panic("reflect: unimplemented: AssignableTo with interface") | |
} | |
return false | |
} |
If a solution becomes available, I can use some existing tests in fxamacker/cbor to help test it.
jaredLunde, x448, reteps, xplshn and 3ddi
Metadata
Metadata
Assignees
Labels
reflectionNeeds further work on reflectionNeeds further work on reflection