reflect: implement a number of stub functions
These stub functions are necessary for the encoding/json package. They don't seem to be called in trivial cases, so leave them as simple stubs for now.
Этот коммит содержится в:
родитель
c849bccb83
коммит
9f3dcf3733
1 изменённых файлов: 20 добавлений и 0 удалений
|
@ -539,6 +539,14 @@ func maskAndShift(value, offset, size uintptr) uintptr {
|
||||||
return (uintptr(value) >> (offset * 8)) & mask
|
return (uintptr(value) >> (offset * 8)) & mask
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (v Value) NumMethod() int {
|
||||||
|
return v.typecode.NumMethod()
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v Value) OverflowFloat(x float64) bool {
|
||||||
|
panic("unimplemented: (reflect.Value).OverflowFloat()")
|
||||||
|
}
|
||||||
|
|
||||||
func (v Value) MapKeys() []Value {
|
func (v Value) MapKeys() []Value {
|
||||||
panic("unimplemented: (reflect.Value).MapKeys()")
|
panic("unimplemented: (reflect.Value).MapKeys()")
|
||||||
}
|
}
|
||||||
|
@ -662,6 +670,18 @@ func (v Value) SetString(x string) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (v Value) SetBytes(x []byte) {
|
||||||
|
panic("unimplemented: (reflect.Value).SetBytes()")
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v Value) SetCap(n int) {
|
||||||
|
panic("unimplemented: (reflect.Value).SetCap()")
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v Value) SetLen(n int) {
|
||||||
|
panic("unimplemented: (reflect.Value).SetLen()")
|
||||||
|
}
|
||||||
|
|
||||||
func (v Value) checkAddressable() {
|
func (v Value) checkAddressable() {
|
||||||
if !v.isIndirect() {
|
if !v.isIndirect() {
|
||||||
panic("reflect: value is not addressable")
|
panic("reflect: value is not addressable")
|
||||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче