reflect: stub channel select routines/types

Этот коммит содержится в:
Damian Gryski 2023-03-24 09:36:41 -07:00 коммит произвёл Ron Evans
родитель 3fbd3c4d93
коммит 1a60a1f526

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

@ -1753,6 +1753,33 @@ func MakeMapWithSize(typ Type, n int) Value {
}
}
type SelectDir int
const (
_ SelectDir = iota
SelectSend // case Chan <- Send
SelectRecv // case <-Chan:
SelectDefault // default
)
type SelectCase struct {
Dir SelectDir // direction of case
Chan Value // channel to use (for send or receive)
Send Value // value to send (for send)
}
func Select(cases []SelectCase) (chosen int, recv Value, recvOK bool) {
panic("unimplemented: reflect.Select")
}
func (v Value) Send(x Value) {
panic("unimplemented: reflect.Value.Send()")
}
func (v Value) Close() {
panic("unimplemented: reflect.Value.Close()")
}
// MakeMap creates a new map with the specified type.
func MakeMap(typ Type) Value {
return MakeMapWithSize(typ, 8)