internal/lib/reflect: type.Name type.Elem

This commit is contained in:
visualfc
2024-09-05 20:59:10 +08:00
parent 9cc71b320b
commit e085fd1d57

View File

@@ -539,7 +539,6 @@ func pkgPathFor(t *abi.Type) string {
} }
func (t *rtype) Name() string { func (t *rtype) Name() string {
/*
if !t.t.HasName() { if !t.t.HasName() {
return "" return ""
} }
@@ -556,8 +555,6 @@ func (t *rtype) Name() string {
i-- i--
} }
return s[i+1:] return s[i+1:]
*/
panic("todo: reflect.rtype.Name")
} }
func nameFor(t *abi.Type) string { func nameFor(t *abi.Type) string {
@@ -581,9 +578,7 @@ func elem(t *abi.Type) *abi.Type {
if et != nil { if et != nil {
return et return et
} }
// TODO(xsw): panic("reflect: Elem of invalid type " + stringFor(t))
// panic("reflect: Elem of invalid type " + stringFor(t))
panic("todo: reflect.elem")
} }
func (t *rtype) Elem() Type { func (t *rtype) Elem() Type {