reflect: call decomposeInterface() directly in TypeOf()

Этот коммит содержится в:
Damian Gryski 2023-03-11 16:03:56 -08:00 коммит произвёл Damian Gryski
родитель 584a2718d0
коммит a366c014c7

Просмотреть файл

@ -465,7 +465,8 @@ func (t *rawType) isNamed() bool {
} }
func TypeOf(i interface{}) Type { func TypeOf(i interface{}) Type {
return ValueOf(i).typecode typecode, _ := decomposeInterface(i)
return (*rawType)(typecode)
} }
func PtrTo(t Type) Type { return PointerTo(t) } func PtrTo(t Type) Type { return PointerTo(t) }