reflect: call decomposeInterface() directly in TypeOf()
Этот коммит содержится в:
родитель
584a2718d0
коммит
a366c014c7
1 изменённых файлов: 2 добавлений и 1 удалений
|
@ -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) }
|
||||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче