Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for IsValue (0.23 sec)

  1. src/database/sql/driver/types.go

    	return n.Converter.ConvertValue(v)
    }
    
    // IsValue reports whether v is a valid [Value] parameter type.
    func IsValue(v any) bool {
    	if v == nil {
    		return true
    	}
    	switch v.(type) {
    	case []byte, bool, float64, int64, string, time.Time:
    		return true
    	case decimalDecompose:
    		return true
    	}
    	return false
    }
    
    // IsScanValue is equivalent to [IsValue].
    // It exists for compatibility.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 27 16:30:20 UTC 2024
    - 8.8K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/fuzzer/fuzzer.go

    				field := tobj.Field(i)
    				switch field.Name {
    				case "Default", "Enum", "Example", "Ref":
    					continue
    				default:
    					isValue := true
    					switch field.Type.Kind() {
    					case reflect.Interface, reflect.Map, reflect.Slice, reflect.Pointer:
    						isValue = false
    					}
    					if isValue || c.Intn(10) == 0 {
    						c.Fuzz(vobj.Field(i).Addr().Interface())
    					}
    				}
    			}
    			if c.RandBool() {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 28 19:06:46 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/syntax/type.go

    func (f exprFlags) IsType() bool          { return f&2 != 0 }
    func (f exprFlags) IsBuiltin() bool       { return f&4 != 0 } // a language builtin that resembles a function call, e.g., "make, append, new"
    func (f exprFlags) IsValue() bool         { return f&8 != 0 }
    func (f exprFlags) IsNil() bool           { return f&16 != 0 }
    func (f exprFlags) Addressable() bool     { return f&32 != 0 }
    func (f exprFlags) Assignable() bool      { return f&64 != 0 }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 20:03:31 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  4. analysis/analysis-api-fe10/src/org/jetbrains/kotlin/analysis/api/descriptors/symbols/descriptorBased/KtFe10DescNamedClassOrObjectSymbol.kt

        override val isData: Boolean
            get() = withValidityAssertion { descriptor.isData }
    
        override val isInline: Boolean
            get() = withValidityAssertion { descriptor.isInline || descriptor.isValue }
    
        override val isFun: Boolean
            get() = withValidityAssertion { descriptor.isFun }
    
        override val isExternal: Boolean
            get() = withValidityAssertion { descriptor.isExternal }
    
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Mon May 27 09:59:11 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/types2/api.go

    // a (possibly parenthesized) built-in function.
    func (tv TypeAndValue) IsBuiltin() bool {
    	return tv.mode == builtin
    }
    
    // IsValue reports whether the corresponding expression is a value.
    // Builtins are not considered values. Constant values have a non-
    // nil Value.
    func (tv TypeAndValue) IsValue() bool {
    	switch tv.mode {
    	case constant_, variable, mapindex, value, nilvalue, commaok, commaerr:
    		return true
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 13:48:53 UTC 2024
    - 17.4K bytes
    - Viewed (0)
  6. src/go/types/api.go

    // a (possibly parenthesized) built-in function.
    func (tv TypeAndValue) IsBuiltin() bool {
    	return tv.mode == builtin
    }
    
    // IsValue reports whether the corresponding expression is a value.
    // Builtins are not considered values. Constant values have a non-
    // nil Value.
    func (tv TypeAndValue) IsValue() bool {
    	switch tv.mode {
    	case constant_, variable, mapindex, value, commaok, commaerr:
    		return true
    	}
    	return false
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 17.2K bytes
    - Viewed (0)
  7. src/database/sql/convert.go

    	// struct changing into a string or nil.
    	if vr, ok := nv.Value.(driver.Valuer); ok {
    		sv, err := callValuerValue(vr)
    		if err != nil {
    			return err
    		}
    		if !driver.IsValue(sv) {
    			return fmt.Errorf("non-subset type %T returned from Value", sv)
    		}
    		nv.Value = sv
    	}
    
    	// Second, ask the column to sanity check itself. For
    	// example, drivers might use this to make sure that
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  8. src/go/types/example_test.go

    		return "type"
    	case tv.IsBuiltin():
    		return "builtin"
    	case tv.IsNil():
    		return "nil"
    	case tv.Assignable():
    		if tv.Addressable() {
    			return "var"
    		}
    		return "mapindex"
    	case tv.IsValue():
    		return "value"
    	default:
    		return "unknown"
    	}
    }
    
    func exprString(fset *token.FileSet, expr ast.Expr) string {
    	var buf strings.Builder
    	format.Node(&buf, fset, expr)
    	return buf.String()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/syntax/parser.go

    	case *ParenExpr:
    		return isValue(x.X)
    	case *IndexExpr:
    		return isValue(x.X) || isValue(x.Index)
    	}
    	return false
    }
    
    // Element = Expression | LiteralValue .
    func (p *parser) bare_complitexpr() Expr {
    	if trace {
    		defer p.trace("bare_complitexpr")()
    	}
    
    	if p.tok == _Lbrace {
    		// '{' start_complit braced_keyval_list '}'
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 62.9K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/copylock/copylock.go

    		if _, ok := astutil.Unparen(star.X).(*ast.CallExpr); ok {
    			// A call may return a pointer to a zero value.
    			return nil
    		}
    	}
    	if tv, ok := pass.TypesInfo.Types[x]; ok && tv.IsValue() {
    		return lockPath(pass.Pkg, tv.Type, nil)
    	}
    	return nil
    }
    
    // lockPath returns a typePath describing the location of a lock value
    // contained in typ. If there is no contained lock, it returns nil.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 9.9K bytes
    - Viewed (0)
Back to top