Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 49 for arrayType (0.25 sec)

  1. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/validation_test.go

    			obj:    []interface{}{"bar"},
    			oldObj: []interface{}{"baz"},
    			schema: withRule(arrayType("", nil, &stringSchema), `
    				!oldSelf.hasValue() || self[0] == "bar"
    			`),
    		},
    		{
    			name: "array - conditional index",
    			obj:  []interface{}{},
    			oldObj: []interface{}{
    				"baz",
    			},
    			schema: withRule(arrayType("", nil, &stringSchema), `
    				self.size() > 0 || oldSelf[?0].orValue("baz") == "baz"
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 17:14:10 UTC 2024
    - 159.9K bytes
    - Viewed (0)
  2. src/cmd/vendor/github.com/ianlancetaylor/demangle/demangle.go

    		Args:         types,
    		ForLocalName: false, // may be set later in encoding
    	}
    }
    
    // arrayType parses:
    //
    //	<array-type> ::= A <(positive dimension) number> _ <(element) type>
    //	             ::= A [<(dimension) expression>] _ <(element) type>
    func (st *state) arrayType(isCast bool) AST {
    	st.checkChar('A')
    
    	if len(st.str) == 0 {
    		st.fail("missing array dimension")
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 31 19:48:28 UTC 2024
    - 94.1K bytes
    - Viewed (0)
  3. src/go/types/expr.go

    			// Check for them here so we don't have to handle ... in general.
    			if atyp, _ := e.Type.(*ast.ArrayType); atyp != nil && atyp.Len != nil {
    				if ellip, _ := atyp.Len.(*ast.Ellipsis); ellip != nil && ellip.Elt == nil {
    					// We have an "open" [...]T array type.
    					// Create a new ArrayType with unknown length (-1)
    					// and finish setting it up after analyzing the literal.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 02:09:54 UTC 2024
    - 49.7K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/expr.go

    			// [...]T array types may only appear with composite literals.
    			// Check for them here so we don't have to handle ... in general.
    			if atyp, _ := e.Type.(*syntax.ArrayType); atyp != nil && atyp.Len == nil {
    				// We have an "open" [...]T array type.
    				// Create a new ArrayType with unknown length (-1)
    				// and finish setting it up after analyzing the literal.
    				typ = &Array{len: -1, elem: check.varType(atyp.Elem)}
    				base = typ
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 02:09:54 UTC 2024
    - 51.7K bytes
    - Viewed (0)
  5. src/go/ast/filter.go

    	}
    	return b
    }
    
    func filterType(typ Expr, f Filter, export bool) bool {
    	switch t := typ.(type) {
    	case *Ident:
    		return f(t.Name)
    	case *ParenExpr:
    		return filterType(t.X, f, export)
    	case *ArrayType:
    		return filterType(t.Elt, f, export)
    	case *StructType:
    		if filterFieldList(t.Fields, f, export) {
    			t.Incomplete = true
    		}
    		return len(t.Fields.List) > 0
    	case *FuncType:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  6. src/internal/reflectlite/value.go

    func maplen(unsafe.Pointer) int
    
    // Len returns v's length.
    // It panics if v's Kind is not Array, Chan, Map, Slice, or String.
    func (v Value) Len() int {
    	k := v.kind()
    	switch k {
    	case abi.Array:
    		tt := (*arrayType)(unsafe.Pointer(v.typ()))
    		return int(tt.Len)
    	case abi.Chan:
    		return chanlen(v.pointer())
    	case abi.Map:
    		return maplen(v.pointer())
    	case abi.Slice:
    		// Slice is bigger than a word; assume flagIndir.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 17:01:54 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  7. src/reflect/abi.go

    	case Interface:
    		return a.assignIntN(offset, goarch.PtrSize, 2, 0b10)
    	case Slice:
    		return a.assignIntN(offset, goarch.PtrSize, 3, 0b001)
    	case Array:
    		tt := (*arrayType)(unsafe.Pointer(t))
    		switch tt.Len {
    		case 0:
    			// There's nothing to assign, so don't modify
    			// a.steps but succeed so the caller doesn't
    			// try to stack-assign this value.
    			return true
    		case 1:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 17:08:32 UTC 2024
    - 15K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types2/typexpr.go

    	case *syntax.ParenExpr:
    		// Generic types must be instantiated before they can be used in any form.
    		// Consequently, generic types cannot be parenthesized.
    		return check.definedType(e.X, def)
    
    	case *syntax.ArrayType:
    		typ := new(Array)
    		setDefType(def, typ)
    		if e.Len != nil {
    			typ.len = check.arrayLength(e.Len)
    		} else {
    			// [...]array
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  9. src/go/types/generate_test.go

    		case *ast.ValueSpec:
    			// rewrite type Typ = [...]Type{...} to type Typ = []Type{...}
    			if len(n.Names) == 1 && n.Names[0].Name == "Typ" && len(n.Values) == 1 {
    				n.Values[0].(*ast.CompositeLit).Type.(*ast.ArrayType).Len = nil
    				return false
    			}
    		}
    		return true
    	})
    }
    
    // fixSprintf adds an extra nil argument for the *token.FileSet parameter in sprintf calls.
    func fixSprintf(f *ast.File) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 16.5K bytes
    - Viewed (0)
  10. src/runtime/syscall_windows.go

    	case abi.Int64, abi.Uint64:
    		// Only register-assign if the registers are big enough.
    		if goarch.PtrSize == 8 {
    			return p.assignReg(t.Size_, offset)
    		}
    	case abi.Array:
    		at := (*arraytype)(unsafe.Pointer(t))
    		if at.Len == 1 {
    			return p.tryRegAssignArg(at.Elem, offset) // TODO fix when runtime is fully commoned up w/ abi.Type
    		}
    	case abi.Struct:
    		st := (*structtype)(unsafe.Pointer(t))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 20:12:46 UTC 2024
    - 16.6K bytes
    - Viewed (0)
Back to top