- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 18 for RecvOnly (0.42 sec)
-
src/go/types/chan.go
elem Type } // A ChanDir value indicates a channel direction. type ChanDir int // The direction of a channel is indicated by one of these constants. const ( SendRecv ChanDir = iota SendOnly RecvOnly ) // NewChan returns a new channel type for the given direction and element type. func NewChan(dir ChanDir, elem Type) *Chan { return &Chan{dir: dir, elem: elem} } // Dir returns the direction of channel c.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 03 18:48:38 UTC 2024 - 1K bytes - Viewed (0) -
src/cmd/compile/internal/types2/chan.go
elem Type } // A ChanDir value indicates a channel direction. type ChanDir int // The direction of a channel is indicated by one of these constants. const ( SendRecv ChanDir = iota SendOnly RecvOnly ) // NewChan returns a new channel type for the given direction and element type. func NewChan(dir ChanDir, elem Type) *Chan { return &Chan{dir: dir, elem: elem} } // Dir returns the direction of channel c.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jul 01 22:17:50 UTC 2021 - 910 bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/iexport.go
// Tag itag // arrayType // Len uint64 // Elem typeOff // } // // type ChanType struct { // Tag itag // chanType // Dir uint64 // 1 RecvOnly; 2 SendOnly; 3 SendRecv // Elem typeOff // } // // type MapType struct { // Tag itag // mapType // Key typeOff // Elem typeOff // } //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jul 21 02:40:02 UTC 2023 - 6.8K bytes - Viewed (0) -
src/go/types/typestring.go
var parens bool switch t.dir { case SendRecv: s = "chan " // chan (<-chan T) requires parentheses if c, _ := t.elem.(*Chan); c != nil && c.dir == RecvOnly { parens = true } case SendOnly: s = "chan<- " case RecvOnly: s = "<-chan " default: w.error("unknown channel direction") } w.string(s) if parens { w.byte('(') } w.typ(t.elem)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:01:18 UTC 2024 - 12.3K bytes - Viewed (0) -
src/cmd/compile/internal/types2/typestring.go
var parens bool switch t.dir { case SendRecv: s = "chan " // chan (<-chan T) requires parentheses if c, _ := t.elem.(*Chan); c != nil && c.dir == RecvOnly { parens = true } case SendOnly: s = "chan<- " case RecvOnly: s = "<-chan " default: w.error("unknown channel direction") } w.string(s) if parens { w.byte('(') } w.typ(t.elem)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:01:18 UTC 2024 - 12.2K bytes - Viewed (0) -
src/go/internal/gcimporter/support.go
var ( fakeLines []int fakeLinesOnce sync.Once ) func chanDir(d int) types.ChanDir { // tag values must match the constants in cmd/compile/internal/gc/go.go switch d { case 1 /* Crecv */ : return types.RecvOnly case 2 /* Csend */ : return types.SendOnly case 3 /* Cboth */ : return types.SendRecv default: errorf("unexpected channel dir %d", d) return 0 } } var predeclared = []types.Type{
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 07 20:08:23 UTC 2024 - 4.1K bytes - Viewed (0) -
src/cmd/compile/internal/types2/typexpr.go
typ := new(Chan) setDefType(def, typ) dir := SendRecv switch e.Dir { case 0: // nothing to do case syntax.SendOnly: dir = SendOnly case syntax.RecvOnly: dir = RecvOnly default: check.errorf(e, InvalidSyntaxTree, "unknown channel direction %d", e.Dir) // ok to continue } typ.dir = dir typ.elem = check.varType(e.Elem) return typ
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 16.6K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/printer.go
case *MapType: p.print(_Map, _Lbrack, n.Key, _Rbrack, n.Value) case *ChanType: if n.Dir == RecvOnly { p.print(_Arrow) } p.print(_Chan) if n.Dir == SendOnly { p.print(_Arrow) } p.print(blank) if e, _ := n.Elem.(*ChanType); n.Dir == 0 && e != nil && e.Dir == RecvOnly { // don't print chan (<-chan T) as chan <-chan T p.print(_Lparen) p.print(n.Elem) p.print(_Rparen)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Aug 24 07:17:27 UTC 2023 - 21.5K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/nodes.go
node typeAndValue // After typechecking, contains the results of typechecking this expression. } func (*expr) aExpr() {} type ChanDir uint const ( _ ChanDir = iota SendOnly RecvOnly ) // ---------------------------------------------------------------------------- // Statements type ( Stmt interface { Node aStmt() } SimpleStmt interface { Stmt
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Sep 20 14:52:38 UTC 2023 - 9K bytes - Viewed (0) -
src/go/types/typexpr.go
typ := new(Chan) setDefType(def, typ) dir := SendRecv switch e.Dir { case ast.SEND | ast.RECV: // nothing to do case ast.SEND: dir = SendOnly case ast.RECV: dir = RecvOnly default: check.errorf(e, InvalidSyntaxTree, "unknown channel direction %d", e.Dir) // ok to continue } typ.dir = dir typ.elem = check.varType(e.Value) return typ default:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 16.3K bytes - Viewed (0)