- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 25 for IsMap (0.04 sec)
-
staging/src/k8s.io/apiserver/pkg/cel/common/values.go
return types.MapType } return types.NewErr("type conversion error from '%s' to '%s'", t.Type(), typeValue.TypeName()) } func (t *unstructuredMap) Equal(other ref.Val) ref.Val { oMap, isMap := other.(traits.Mapper) if !isMap { return types.MaybeNoSuchOverloadErr(other) } if t.Size() != oMap.Size() { return types.False } for key, value := range t.value { if propSchema, ok := t.propSchema(key); ok {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Oct 23 22:30:17 UTC 2023 - 20.5K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/func.go
func tcClear(n *ir.UnaryExpr) ir.Node { n.X = Expr(n.X) n.X = DefaultLit(n.X, nil) l := n.X t := l.Type() if t == nil { n.SetType(nil) return n } switch { case t.IsMap(), t.IsSlice(): default: base.Errorf("invalid operation: %v (argument must be a map or slice)", n) n.SetType(nil) return n } return n } // tcClose typechecks an OCLOSE 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) -
operator/pkg/compare/compare.go
if err != nil { log.Error(err.Error()) } } // IsLeafNode reports whether the given node is a leaf, assuming internal nodes can only be maps or slices. func IsLeafNode(node any) bool { return !util.IsMap(node) && !util.IsSlice(node)
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Apr 15 01:29:35 UTC 2024 - 13.3K bytes - Viewed (0) -
operator/pkg/translate/translate.go
} finalVals := map[string]any{} // strip out anything from the original apiVals which are a map[string]any but populate other top-level fields for k, v := range apiVals { _, isMap := v.(map[string]any) if !isMap { finalVals[k] = v } } for k := range topLevelFields { if v, f := mergedVals[k]; f { finalVals[k] = v } } for k, v := range globals {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Feb 12 19:43:09 UTC 2024 - 36.3K bytes - Viewed (0) -
src/cmd/compile/internal/walk/complit.go
fixedlit(inInitFunction, initKindLocalCode, n, var_, init) case ir.OSLICELIT: n := n.(*ir.CompLitExpr) slicelit(inInitFunction, n, var_, init) case ir.OMAPLIT: n := n.(*ir.CompLitExpr) if !t.IsMap() { base.Fatalf("anylit: not map") } maplit(n, var_, init) } } // oaslit handles special composite literal assignments. // It returns true if n's effects have been added to init,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 08 19:03:54 UTC 2023 - 19.5K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/stmt.go
t := types.Types[types.TBOOL] if n.Tag != nil { n.Tag = Expr(n.Tag) n.Tag = DefaultLit(n.Tag, nil) t = n.Tag.Type() } var nilonly string if t != nil { switch { case t.IsMap(): nilonly = "map" case t.Kind() == types.TFUNC: nilonly = "func" case t.IsSlice(): nilonly = "slice" case !types.IsComparable(t): if t.IsStruct() {
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/cmd/compile/internal/typecheck/expr.go
return l, r, nil } if l.Type().IsSlice() && !ir.IsNil(l) && !ir.IsNil(r) { base.Errorf("invalid operation: %v (slice can only be compared to nil)", n) return l, r, nil } if l.Type().IsMap() && !ir.IsNil(l) && !ir.IsNil(r) { base.Errorf("invalid operation: %v (map can only be compared to nil)", n) return l, r, nil } if l.Type().Kind() == types.TFUNC && !ir.IsNil(l) && !ir.IsNil(r) {
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/staticinit/sched.go
if n.Op() != ir.OAS { return nil } as := n.(*ir.AssignStmt) if ir.IsBlank(as.X) || as.X.Op() != ir.ONAME { return nil } nm := as.X.(*ir.Name) if !nm.Type().IsMap() { return nil } // Determine size of RHS. rsiz := 0 ir.Any(as.Y, func(n ir.Node) bool { rsiz++ return false }) if base.Debug.WrapGlobalMapDbg > 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 17:16:14 UTC 2024 - 30.7K bytes - Viewed (0) -
src/cmd/compile/internal/walk/builtin.go
if n := arrayClear(n.X.Pos(), n.X, nil); n != nil { return n } // If n == nil, we are clearing an array which takes zero memory, do nothing. return ir.NewBlockStmt(n.Pos(), nil) case typ.IsMap(): return mapClear(n.X, reflectdata.TypePtrAt(n.X.Pos(), n.X.Type())) } panic("unreachable") } // walkClose walks an OCLOSE node. func walkClose(n *ir.UnaryExpr, init *ir.Nodes) ir.Node {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 08 22:35:22 UTC 2024 - 31.2K bytes - Viewed (0) -
src/cmd/compile/internal/types/type.go
case TCHAN, TFUNC, TINTER, TMAP, TNIL, TPTR, TSLICE, TUNSAFEPTR: return true } return false } func (t *Type) IsString() bool { return t.kind == TSTRING } func (t *Type) IsMap() bool { return t.kind == TMAP } func (t *Type) IsChan() bool { return t.kind == TCHAN } func (t *Type) IsSlice() bool { return t.kind == TSLICE }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 04 14:29:45 UTC 2024 - 49.5K bytes - Viewed (0)