reflect: add stubs for Method(), CanConvert(), ArrayOf()

Этот коммит содержится в:
Damian Gryski 2023-03-10 11:01:24 -08:00 коммит произвёл Ayke
родитель fb394c7685
коммит 3b2763896f
2 изменённых файлов: 17 добавлений и 1 удалений

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

@ -235,7 +235,7 @@ type Type interface {
// //
// Only exported methods are accessible and they are sorted in // Only exported methods are accessible and they are sorted in
// lexicographic order. // lexicographic order.
//Method(int) Method Method(int) Method
// MethodByName returns the method with that name in the type's // MethodByName returns the method with that name in the type's
// method set and a boolean indicating if the method was found. // method set and a boolean indicating if the method was found.
@ -928,6 +928,10 @@ func (t rawType) Out(i int) Type {
panic("unimplemented: (reflect.Type).Out()") panic("unimplemented: (reflect.Type).Out()")
} }
func (t rawType) Method(i int) Method {
panic("unimplemented: (reflect.Type).Method()")
}
func (t rawType) MethodByName(name string) (Method, bool) { func (t rawType) MethodByName(name string) (Method, bool) {
panic("unimplemented: (reflect.Type).MethodByName()") panic("unimplemented: (reflect.Type).MethodByName()")
} }
@ -1063,3 +1067,7 @@ func align(offset uintptr, alignment uintptr) uintptr {
func SliceOf(t Type) Type { func SliceOf(t Type) Type {
panic("unimplemented: reflect.SliceOf()") panic("unimplemented: reflect.SliceOf()")
} }
func ArrayOf(n int, t Type) Type {
panic("unimplemented: reflect.ArrayOf()")
}

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

@ -1027,6 +1027,10 @@ func (v Value) OverflowUint(x uint64) bool {
panic(&ValueError{Method: "reflect.Value.OverflowUint", Kind: v.Kind()}) panic(&ValueError{Method: "reflect.Value.OverflowUint", Kind: v.Kind()})
} }
func (v Value) CanConvert(t Type) bool {
panic("unimplemented: (reflect.Value).CanConvert()")
}
func (v Value) Convert(t Type) Value { func (v Value) Convert(t Type) Value {
panic("unimplemented: (reflect.Value).Convert()") panic("unimplemented: (reflect.Value).Convert()")
} }
@ -1445,6 +1449,10 @@ func (v Value) Call(in []Value) []Value {
panic("unimplemented: (reflect.Value).Call()") panic("unimplemented: (reflect.Value).Call()")
} }
func (v Value) Method(i int) Value {
panic("unimplemented: (reflect.Value).Method()")
}
func (v Value) MethodByName(name string) Value { func (v Value) MethodByName(name string) Value {
panic("unimplemented: (reflect.Value).MethodByName()") panic("unimplemented: (reflect.Value).MethodByName()")
} }