Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 113 for maxType (0.1 sec)

  1. src/go/types/predicates.go

    			return Typ[String]
    		}
    	}
    	return t
    }
    
    // maxType returns the "largest" type that encompasses both x and y.
    // If x and y are different untyped numeric types, the result is the type of x or y
    // that appears later in this list: integer, rune, floating-point, complex.
    // Otherwise, if x != y, the result is nil.
    func maxType(x, y Type) Type {
    	// We only care about untyped types (for now), so == is good enough.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/types2/predicates.go

    			return Typ[String]
    		}
    	}
    	return t
    }
    
    // maxType returns the "largest" type that encompasses both x and y.
    // If x and y are different untyped numeric types, the result is the type of x or y
    // that appears later in this list: integer, rune, floating-point, complex.
    // Otherwise, if x != y, the result is nil.
    func maxType(x, y Type) Type {
    	// We only care about untyped types (for now), so == is good enough.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 17.5K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/infer.go

    			if maxUntyped == nil {
    				maxUntyped = make(map[*TypeParam]Type)
    			}
    			max := maxUntyped[tpar]
    			if max == nil {
    				max = arg.typ
    			} else {
    				m := maxType(max, arg.typ)
    				if m == nil {
    					err.addf(arg, "mismatched types %s and %s (cannot infer %s)", max, arg.typ, tpar)
    					return nil
    				}
    				max = m
    			}
    			maxUntyped[tpar] = max
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 13:54:20 UTC 2024
    - 26.4K bytes
    - Viewed (0)
  4. src/go/types/infer.go

    			if maxUntyped == nil {
    				maxUntyped = make(map[*TypeParam]Type)
    			}
    			max := maxUntyped[tpar]
    			if max == nil {
    				max = arg.typ
    			} else {
    				m := maxType(max, arg.typ)
    				if m == nil {
    					err.addf(arg, "mismatched types %s and %s (cannot infer %s)", max, arg.typ, tpar)
    					return nil
    				}
    				max = m
    			}
    			maxUntyped[tpar] = max
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 13:54:20 UTC 2024
    - 26.5K bytes
    - Viewed (0)
  5. src/go/types/expr.go

    	if x.mode == invalid || isTyped(x.typ) || !isValid(target) {
    		return x.typ, nil, 0
    	}
    	// x is untyped
    
    	if isUntyped(target) {
    		// both x and target are untyped
    		if m := maxType(x.typ, target); m != nil {
    			return m, nil, 0
    		}
    		return nil, nil, InvalidUntypedConversion
    	}
    
    	switch u := under(target).(type) {
    	case *Basic:
    		if x.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)
  6. src/cmd/compile/internal/types2/expr.go

    	if x.mode == invalid || isTyped(x.typ) || !isValid(target) {
    		return x.typ, nil, 0
    	}
    	// x is untyped
    
    	if isUntyped(target) {
    		// both x and target are untyped
    		if m := maxType(x.typ, target); m != nil {
    			return m, nil, 0
    		}
    		return nil, nil, InvalidUntypedConversion
    	}
    
    	if x.isNil() {
    		assert(isUntyped(x.typ))
    		if hasNil(target) {
    			return target, nil, 0
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 02:09:54 UTC 2024
    - 51.7K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/typecheck/_builtin/runtime.go

    func mapaccess1_fat(mapType *byte, hmap map[any]any, key *any, zero *byte) (val *any)
    func mapaccess2(mapType *byte, hmap map[any]any, key *any) (val *any, pres bool)
    func mapaccess2_fast32(mapType *byte, hmap map[any]any, key uint32) (val *any, pres bool)
    func mapaccess2_fast64(mapType *byte, hmap map[any]any, key uint64) (val *any, pres bool)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 21:08:03 UTC 2024
    - 10.6K bytes
    - Viewed (0)
  8. platforms/ide/tooling-api/src/main/java/org/gradle/tooling/internal/adapter/CollectionMapper.java

        Map<Object, Object> createEmptyMap(Class<?> mapType) {
            if (mapType.isAssignableFrom(LinkedHashMap.class)) {
                return new LinkedHashMap<Object, Object>();
            }
            if (mapType.isAssignableFrom(TreeMap.class)) {
                return new TreeMap<Object, Object>();
            }
            throw new UnsupportedOperationException(String.format("Cannot convert a Map to type %s.", mapType.getName()));
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Sep 26 14:49:20 UTC 2023
    - 2K bytes
    - Viewed (0)
  9. test/fixedbugs/issue4879.dir/a.go

    type slice []int
    
    type maptype map[int]int
    
    func MakePrivateCollection() *Collection {
    	return &Collection{
    		root: unsafe.Pointer(&nodeLoc{}),
    	}
    }
    
    func MakePrivateCollection2() *Collection {
    	return &Collection{
    		root: unsafe.Pointer(&slice{}),
    	}
    }
    func MakePrivateCollection3() *Collection {
    	return &Collection{
    		root: unsafe.Pointer(&maptype{}),
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 25 23:43:31 UTC 2013
    - 466 bytes
    - Viewed (0)
  10. test/stress/maps.go

    package main
    
    import (
    	"math/rand"
    	"runtime"
    	"sync"
    )
    
    func mapTypes() []MapType {
    	// TODO(bradfitz): bunch more map types of all different key and value types.
    	// Use reflect.MapOf and a program to generate lots of types & struct types.
    	// For now, just one:
    	return []MapType{intMapType{}}
    }
    
    type MapType interface {
    	NewMap() Map
    }
    
    type Map interface {
    	AddItem()
    	DelItem()
    	Len() int
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 1.8K bytes
    - Viewed (0)
Back to top