Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for coreString (1.39 sec)

  1. src/go/types/under.go

    		}
    		// su == nil || match(su, u) != nil
    		su = u
    		return true
    	}) {
    		return su
    	}
    	return nil
    }
    
    // coreString is like coreType but also considers []byte
    // and strings as identical. In this case, if successful and we saw
    // a string, the result is of type (possibly untyped) string.
    func coreString(t Type) Type {
    	t = Unalias(t)
    	tpar, _ := t.(*TypeParam)
    	if tpar == nil {
    		return under(t) // string or untyped string
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 22:34:27 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/types2/under.go

    		}
    		// su == nil || match(su, u) != nil
    		su = u
    		return true
    	}) {
    		return su
    	}
    	return nil
    }
    
    // coreString is like coreType but also considers []byte
    // and strings as identical. In this case, if successful and we saw
    // a string, the result is of type (possibly untyped) string.
    func coreString(t Type) Type {
    	t = Unalias(t)
    	tpar, _ := t.(*TypeParam)
    	if tpar == nil {
    		return under(t) // string or untyped string
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 22:34:27 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  3. src/go/types/builtins.go

    		// This form appends the bytes of the string.
    		if nargs == 2 && hasDots(call) {
    			if ok, _ := x.assignableTo(check, NewSlice(universeByte), nil); ok {
    				y := args[1]
    				if t := coreString(y.typ); t != nil && isString(t) {
    					if check.recordTypes() {
    						sig := makeSig(S, S, y.typ)
    						sig.variadic = true
    						check.recordBuiltinType(call.Fun, sig)
    					}
    					x.mode = value
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 27.2K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/index.go

    	check.expr(nil, x, e.X)
    	if x.mode == invalid {
    		check.use(e.Index[:]...)
    		return
    	}
    
    	valid := false
    	length := int64(-1) // valid if >= 0
    	switch u := coreString(x.typ).(type) {
    	case nil:
    		check.errorf(x, NonSliceableOperand, invalidOp+"cannot slice %s: %s has no core type", x, x.typ)
    		x.mode = invalid
    		return
    
    	case *Basic:
    		if isString(u) {
    			if e.Full {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 15 16:16:58 UTC 2023
    - 11.5K bytes
    - Viewed (0)
  5. src/go/types/index.go

    	check.expr(nil, x, e.X)
    	if x.mode == invalid {
    		check.use(e.Low, e.High, e.Max)
    		return
    	}
    
    	valid := false
    	length := int64(-1) // valid if >= 0
    	switch u := coreString(x.typ).(type) {
    	case nil:
    		check.errorf(x, NonSliceableOperand, invalidOp+"cannot slice %s: %s has no core type", x, x.typ)
    		x.mode = invalid
    		return
    
    	case *Basic:
    		if isString(u) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 22 16:17:05 UTC 2024
    - 11.2K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/signature.go

    	if variadic {
    		n := params.Len()
    		if n == 0 {
    			panic("variadic function must have at least one parameter")
    		}
    		core := coreString(params.At(n - 1).typ)
    		if _, ok := core.(*Slice); !ok && !isString(core) {
    			panic(fmt.Sprintf("got %s, want variadic parameter with unnamed slice type or string as core type", core.String()))
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 21:33:05 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/types2/builtins.go

    		// This form appends the bytes of the string.
    		if nargs == 2 && hasDots(call) {
    			if ok, _ := x.assignableTo(check, NewSlice(universeByte), nil); ok {
    				y := args[1]
    				if t := coreString(y.typ); t != nil && isString(t) {
    					if check.recordTypes() {
    						sig := makeSig(S, S, y.typ)
    						sig.variadic = true
    						check.recordBuiltinType(call.Fun, sig)
    					}
    					x.mode = value
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 27.1K bytes
    - Viewed (0)
  8. src/go/types/signature.go

    	if variadic {
    		n := params.Len()
    		if n == 0 {
    			panic("variadic function must have at least one parameter")
    		}
    		core := coreString(params.At(n - 1).typ)
    		if _, ok := core.(*Slice); !ok && !isString(core) {
    			panic(fmt.Sprintf("got %s, want variadic parameter with unnamed slice type or string as core type", core.String()))
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 29 22:06:18 UTC 2024
    - 13K bytes
    - Viewed (0)
  9. pkg/test/echo/server/endpoint/http.go

    		codestrings = strconv.Itoa(http.StatusOK) + ":1"
    	}
    
    	aCodestrings := strings.Split(codestrings, ",")
    	codes := make([]codeAndSlices, len(aCodestrings))
    
    	for i, codestring := range aCodestrings {
    		codeAndSlice, err := validateCodeAndSlices(codestring)
    		if err != nil {
    			return []codeAndSlices{{http.StatusBadRequest, 1}}, err
    		}
    		codes[i] = codeAndSlice
    	}
    
    	return codes, nil
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 16:20:31 UTC 2023
    - 12.8K bytes
    - Viewed (0)
  10. pilot/pkg/model/network.go

    			continue
    		}
    		response = cResponse
    		if rcode == dns.RcodeSuccess {
    			break
    		}
    		codeString := dns.RcodeToString[rcode]
    		log.Debugf("upstream dns error: %v: %v: %v", upstream, getReqNames(req), codeString)
    	}
    	if response == nil {
    		response = new(dns.Msg)
    		response.SetReply(req)
    		response.Rcode = dns.RcodeServerFailure
    	}
    	return response
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 24 03:31:28 UTC 2023
    - 16.9K bytes
    - Viewed (0)
Back to top