reflect: call decomposeInterface() directly in TypeOf()

This commit is contained in:
Damian Gryski
2023-03-11 16:03:56 -08:00
committed by Damian Gryski
parent 584a2718d0
commit a366c014c7
+2 -1
View File
@@ -465,7 +465,8 @@ func (t *rawType) isNamed() bool {
}
func TypeOf(i interface{}) Type {
return ValueOf(i).typecode
typecode, _ := decomposeInterface(i)
return (*rawType)(typecode)
}
func PtrTo(t Type) Type { return PointerTo(t) }