- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 22 for ChanDir (0.22 sec)
-
src/go/ast/ast.go
Colon token.Pos // position of ":" Value Expr } ) // The direction of a channel type is indicated by a bit // mask including one or both of the following constants. type ChanDir int const ( SEND ChanDir = 1 << iota RECV ) // A type is represented by a tree consisting of one // or more of the following type-specific expression // nodes. type (
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 28 21:32:41 UTC 2024 - 35.6K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/internal/analysisinternal/analysis.go
value := TypeExpr(f, pkg, t.Elem()) if key == nil || value == nil { return nil } return &ast.MapType{ Key: key, Value: value, } case *types.Chan: dir := ast.ChanDir(t.Dir()) if t.Dir() == types.SendRecv { dir = ast.SEND | ast.RECV } value := TypeExpr(f, pkg, t.Elem()) if value == nil { return nil } return &ast.ChanType{ Dir: dir,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 16:19:04 UTC 2024 - 11.7K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/stmt.go
n.Chan = DefaultLit(n.Chan, nil) t := n.Chan.Type() if t == nil { return n } if !t.IsChan() { base.Errorf("invalid operation: %v (send to non-chan type %v)", n, t) return n } if !t.ChanDir().CanSend() { base.Errorf("invalid operation: %v (send to receive-only type %v)", n, t) return n } n.Value = AssignConv(n.Value, t.Elem(), "send") if n.Value.Type() == nil { return n }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Nov 20 15:10:54 UTC 2023 - 17.8K bytes - Viewed (0) -
src/go/internal/gcimporter/iimport.go
return types.NewPointer(r.typ()) case sliceType: return types.NewSlice(r.typ()) case arrayType: n := r.uint64() return types.NewArray(r.typ(), int64(n)) case chanType: dir := chanDir(int(r.uint64())) return types.NewChan(dir, r.typ()) case mapType: return types.NewMap(r.typ(), r.typ()) case signatureType: r.currPkg = r.pkg() return r.signature(nil, nil, nil)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 19.2K bytes - Viewed (0) -
src/go/internal/gcimporter/ureader.go
case pkgbits.TypeTypeParam: return r.dict.tparams[r.Len()] case pkgbits.TypeArray: len := int64(r.Uint64()) return types.NewArray(r.typ(), len) case pkgbits.TypeChan: dir := types.ChanDir(r.Len()) return types.NewChan(dir, r.typ()) case pkgbits.TypeMap: return types.NewMap(r.typ(), r.typ()) case pkgbits.TypePointer: return types.NewPointer(r.typ()) case pkgbits.TypeSignature:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 16.6K bytes - Viewed (0) -
src/reflect/value.go
// It panics if v's Kind is not [Chan] or // v is a receive-only channel. func (v Value) Close() { v.mustBe(Chan) v.mustBeExported() tt := (*chanType)(unsafe.Pointer(v.typ())) if ChanDir(tt.Dir)&SendDir == 0 { panic("reflect: close of receive-only channel") } chanclose(v.pointer()) } // CanComplex reports whether [Value.Complex] can be used without panicking.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 21:17:41 UTC 2024 - 119.9K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/subr.go
return ir.OXXX, why } // 4. src is a bidirectional channel value, dst is a channel type, // src and dst have identical element types, and // either src or dst is not a named type. if src.IsChan() && src.ChanDir() == types.Cboth && dst.IsChan() { if types.Identical(src.Elem(), dst.Elem()) && (src.Sym() == nil || dst.Sym() == nil) { return ir.OCONVNOP, "" } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 05 19:45:58 UTC 2023 - 20.2K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/expr.go
if t == nil { n.SetType(nil) return n } if !t.IsChan() { base.Errorf("invalid operation: %v (receive from non-chan type %v)", n, t) n.SetType(nil) return n } if !t.ChanDir().CanRecv() { base.Errorf("invalid operation: %v (receive from send-only type %v)", n, t) n.SetType(nil) return n } n.SetType(t.Elem()) return n } // tcSPtr typechecks an OSPTR node.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 04 14:29:45 UTC 2024 - 23.1K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/func.go
t := l.Type() if t == nil { n.SetType(nil) return n } if !t.IsChan() { base.Errorf("invalid operation: %v (non-chan type %v)", n, t) n.SetType(nil) return n } if !t.ChanDir().CanSend() { base.Errorf("invalid operation: %v (cannot close receive-only channel)", n) n.SetType(nil) return n } return n } // tcComplex typechecks an OCOMPLEX node.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 06 15:23:18 UTC 2024 - 21.1K bytes - Viewed (0) -
src/text/template/exec.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 24 21:22:24 UTC 2024 - 32K bytes - Viewed (0)