diff options
author | Damian Gryski <[email protected]> | 2023-03-24 09:36:41 -0700 |
---|---|---|
committer | Ron Evans <[email protected]> | 2023-03-30 21:10:54 +0200 |
commit | 1a60a1f52625412c8c18dc95a679dc90c0324772 (patch) | |
tree | 5ef379074f9a5cf2150a8abfc5768388c9b49e40 /src/reflect | |
parent | 3fbd3c4d935f7c1b7c1db21319b8b2b5386e6075 (diff) | |
download | tinygo-1a60a1f52625412c8c18dc95a679dc90c0324772.tar.gz tinygo-1a60a1f52625412c8c18dc95a679dc90c0324772.zip |
reflect: stub channel select routines/types
Diffstat (limited to 'src/reflect')
-rw-r--r-- | src/reflect/value.go | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/reflect/value.go b/src/reflect/value.go index ed4d01cdf..dbe487f88 100644 --- a/src/reflect/value.go +++ b/src/reflect/value.go @@ -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) |