Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for allOrdered (0.12 sec)

  1. src/cmd/compile/internal/types2/predicates.go

    func allUnsigned(t Type) bool        { return allBasic(t, IsUnsigned) }
    func allNumeric(t Type) bool         { return allBasic(t, IsNumeric) }
    func allString(t Type) bool          { return allBasic(t, IsString) }
    func allOrdered(t Type) bool         { return allBasic(t, IsOrdered) }
    func allNumericOrString(t Type) bool { return allBasic(t, IsNumeric|IsString) }
    
    // allBasic reports whether under(t) is a basic type with the specified info.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 17.5K bytes
    - Viewed (0)
  2. src/go/types/predicates.go

    func allUnsigned(t Type) bool        { return allBasic(t, IsUnsigned) }
    func allNumeric(t Type) bool         { return allBasic(t, IsNumeric) }
    func allString(t Type) bool          { return allBasic(t, IsString) }
    func allOrdered(t Type) bool         { return allBasic(t, IsOrdered) }
    func allNumericOrString(t Type) bool { return allBasic(t, IsNumeric|IsString) }
    
    // allBasic reports whether under(t) is a basic type with the specified info.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  3. src/go/types/expr.go

    			goto Error
    		}
    
    	case token.LSS, token.LEQ, token.GTR, token.GEQ:
    		// spec: The ordering operators <, <=, >, and >= apply to operands that are ordered."
    		switch {
    		case !allOrdered(x.typ):
    			errOp = x
    			goto Error
    		case !allOrdered(y.typ):
    			errOp = y
    			goto Error
    		}
    
    	default:
    		panic("unreachable")
    	}
    
    	// comparison is ok
    	if x.mode == constant_ && y.mode == constant_ {
    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

    			goto Error
    		}
    
    	case syntax.Lss, syntax.Leq, syntax.Gtr, syntax.Geq:
    		// spec: The ordering operators <, <=, >, and >= apply to operands that are ordered."
    		switch {
    		case !allOrdered(x.typ):
    			errOp = x
    			goto Error
    		case !allOrdered(y.typ):
    			errOp = y
    			goto Error
    		}
    
    	default:
    		panic("unreachable")
    	}
    
    	// comparison is ok
    	if x.mode == constant_ && y.mode == constant_ {
    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/cmd/compile/internal/types2/builtins.go

    		op := token.LSS
    		if id == _Max {
    			op = token.GTR
    		}
    
    		for i, a := range args {
    			if a.mode == invalid {
    				return
    			}
    
    			if !allOrdered(a.typ) {
    				check.errorf(a, InvalidMinMaxOperand, invalidArg+"%s cannot be ordered", a)
    				return
    			}
    
    			// The first argument is already in x and there's nothing left to do.
    			if i > 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 27.1K bytes
    - Viewed (0)
  6. src/go/types/builtins.go

    		op := token.LSS
    		if id == _Max {
    			op = token.GTR
    		}
    
    		for i, a := range args {
    			if a.mode == invalid {
    				return
    			}
    
    			if !allOrdered(a.typ) {
    				check.errorf(a, InvalidMinMaxOperand, invalidArg+"%s cannot be ordered", a)
    				return
    			}
    
    			// The first argument is already in x and there's nothing left to do.
    			if i > 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 27.2K bytes
    - Viewed (0)
Back to top