runtime/internal/lib/reflectlite: implement func

This commit is contained in:
visualfc
2025-02-07 12:04:54 +08:00
parent a345746cbd
commit 09c8567e39
3 changed files with 201 additions and 315 deletions

View File

@@ -903,16 +903,13 @@ func fnv1(x uint32, list ...byte) uint32 {
}
func (t *rtype) Implements(u Type) bool {
/*
if u == nil {
panic("reflect: nil type passed to Type.Implements")
}
if u.Kind() != Interface {
panic("reflect: non-interface type passed to Type.Implements")
}
return implements(u.common(), t.common())
*/
panic("todo: reflect.rtype.Implements")
if u == nil {
panic("reflect: nil type passed to Type.Implements")
}
if u.Kind() != Interface {
panic("reflect: non-interface type passed to Type.Implements")
}
return implements(u.common(), t.common())
}
func (t *rtype) AssignableTo(u Type) bool {