Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 101 for TypeParam (0.41 sec)

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

    	origT := T
    	V := Unalias(x.typ)
    	T = Unalias(T)
    
    	// x's type is identical to T
    	if Identical(V, T) {
    		return true, 0
    	}
    
    	Vu := under(V)
    	Tu := under(T)
    	Vp, _ := V.(*TypeParam)
    	Tp, _ := T.(*TypeParam)
    
    	// x is an untyped value representable by a value of type T.
    	if isUntyped(Vu) {
    		assert(Vp == nil)
    		if Tp != nil {
    			// T is a type parameter: x is assignable to T if it is
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 21:17:10 UTC 2024
    - 11K bytes
    - Viewed (0)
  2. src/go/internal/gcimporter/ureader.go

    	// bounds is a slice of typeInfos corresponding to the underlying
    	// bounds of the element's type parameters.
    	bounds []typeInfo
    
    	// tparams is a slice of the constructed TypeParams for the element.
    	tparams []*types.TypeParam
    
    	// derived is a slice of types derived from tparams, which may be
    	// instantiated while reading the current element.
    	derived      []derivedInfo
    	derivedTypes []types.Type // lazily instantiated from derived
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  3. src/cmd/vendor/golang.org/x/tools/internal/typeparams/free.go

    		}
    		for i, n := 0, args.Len(); i < n; i++ {
    			if w.Has(args.At(i)) {
    				return true
    			}
    		}
    		return w.Has(t.Underlying()) // recurse for types local to parameterized functions
    
    	case *types.TypeParam:
    		return true
    
    	default:
    		panic(t) // unreachable
    	}
    
    	return false
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/format.go

    			w.tpSubscripts = tpSubscripts
    			buf.WriteByte('[')
    			for i, x := range a {
    				if i > 0 {
    					buf.WriteString(", ")
    				}
    				w.typ(x)
    			}
    			buf.WriteByte(']')
    			arg = buf.String()
    		case []*TypeParam:
    			var buf bytes.Buffer
    			w := newTypeWriter(&buf, qf)
    			w.tpSubscripts = tpSubscripts
    			buf.WriteByte('[')
    			for i, x := range a {
    				if i > 0 {
    					buf.WriteString(", ")
    				}
    				w.typ(x)
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/reflect/TypeToken.java

       */
      public final <X> TypeToken<T> where(TypeParameter<X> typeParam, TypeToken<X> typeArg) {
        TypeResolver resolver =
            new TypeResolver()
                .where(
                    ImmutableMap.of(
                        new TypeResolver.TypeVariableKey(typeParam.typeVariable), typeArg.runtimeType));
        // If there's any type error, we'd report now rather than later.
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Jun 26 21:02:13 UTC 2023
    - 53.6K bytes
    - Viewed (0)
  6. guava/src/com/google/common/reflect/TypeToken.java

       */
      public final <X> TypeToken<T> where(TypeParameter<X> typeParam, TypeToken<X> typeArg) {
        TypeResolver resolver =
            new TypeResolver()
                .where(
                    ImmutableMap.of(
                        new TypeResolver.TypeVariableKey(typeParam.typeVariable), typeArg.runtimeType));
        // If there's any type error, we'd report now rather than later.
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Jun 26 21:02:13 UTC 2023
    - 53.6K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/tools/go/types/typeutil/map.go

    	case *types.Named:
    		hash := h.hashPtr(t.Obj())
    		targs := t.TypeArgs()
    		for i := 0; i < targs.Len(); i++ {
    			targ := targs.At(i)
    			hash += 2 * h.Hash(targ)
    		}
    		return hash
    
    	case *types.TypeParam:
    		return h.hashTypeParam(t)
    
    	case *types.Tuple:
    		return h.hashTuple(t)
    	}
    
    	panic(fmt.Sprintf("%T: %v", t, t))
    }
    
    func (h Hasher) hashTuple(tuple *types.Tuple) uint32 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types2/sizes.go

    		assert(!isTypeParam(T))
    		return s.WordSize
    	case *Basic:
    		// Strings are like slices and interfaces.
    		if t.Info()&IsString != 0 {
    			return s.WordSize
    		}
    	case *TypeParam, *Union:
    		panic("unreachable")
    	}
    	a := s.Sizeof(T) // may be 0 or negative
    	// spec: "For a variable x of any type: unsafe.Alignof(x) is at least 1."
    	if a < 1 {
    		return 1
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 8.8K bytes
    - Viewed (0)
  9. src/go/types/format.go

    			w.tpSubscripts = tpSubscripts
    			buf.WriteByte('[')
    			for i, x := range a {
    				if i > 0 {
    					buf.WriteString(", ")
    				}
    				w.typ(x)
    			}
    			buf.WriteByte(']')
    			arg = buf.String()
    		case []*TypeParam:
    			var buf bytes.Buffer
    			w := newTypeWriter(&buf, qf)
    			w.tpSubscripts = tpSubscripts
    			buf.WriteByte('[')
    			for i, x := range a {
    				if i > 0 {
    					buf.WriteString(", ")
    				}
    				w.typ(x)
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/shift/shift.go

    	if !ok {
    		return
    	}
    	t := pass.TypesInfo.Types[x].Type
    	if t == nil {
    		return
    	}
    	var structuralTypes []types.Type
    	switch t := aliases.Unalias(t).(type) {
    	case *types.TypeParam:
    		terms, err := typeparams.StructuralTerms(t)
    		if err != nil {
    			return // invalid type
    		}
    		for _, term := range terms {
    			structuralTypes = append(structuralTypes, term.Type())
    		}
    	default:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 3.5K bytes
    - Viewed (0)
Back to top