Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 101 for TypeParam (0.15 sec)

  1. src/go/types/subst.go

    // This file implements type parameter substitution.
    
    package types
    
    import (
    	"go/token"
    )
    
    type substMap map[*TypeParam]Type
    
    // makeSubstMap creates a new substitution map mapping tpars[i] to targs[i].
    // If targs[i] is nil, tpars[i] is not substituted.
    func makeSubstMap(tpars []*TypeParam, targs []Type) substMap {
    	assert(len(tpars) == len(targs))
    	proj := make(substMap, len(tpars))
    	for i, tpar := range tpars {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:04:07 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/types2/subst.go

    package types2
    
    import (
    	"cmd/compile/internal/syntax"
    )
    
    type substMap map[*TypeParam]Type
    
    // makeSubstMap creates a new substitution map mapping tpars[i] to targs[i].
    // If targs[i] is nil, tpars[i] is not substituted.
    func makeSubstMap(tpars []*TypeParam, targs []Type) substMap {
    	assert(len(tpars) == len(targs))
    	proj := make(substMap, len(tpars))
    	for i, tpar := range tpars {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:04:07 UTC 2024
    - 11K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/unify.go

    		u.setHandle(x, hy)
    	}
    	return true
    }
    
    // asBoundTypeParam returns x.(*TypeParam) if x is a type parameter recorded with u.
    // Otherwise, the result is nil.
    func (u *unifier) asBoundTypeParam(x Type) *TypeParam {
    	if x, _ := Unalias(x).(*TypeParam); x != nil {
    		if _, found := u.handles[x]; found {
    			return x
    		}
    	}
    	return nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 16:24:39 UTC 2024
    - 27.8K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/tools/internal/typeparams/normalize.go

    // type set. In the latter case, StructuralTerms returns ErrEmptyTypeSet.
    //
    // StructuralTerms makes no guarantees about the order of terms, except that it
    // is deterministic.
    func StructuralTerms(tparam *types.TypeParam) ([]*types.Term, error) {
    	constraint := tparam.Constraint()
    	if constraint == nil {
    		return nil, fmt.Errorf("%s has nil constraint", tparam)
    	}
    	iface, _ := constraint.Underlying().(*types.Interface)
    	if iface == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 18 21:28:13 UTC 2023
    - 6.7K bytes
    - Viewed (0)
  5. src/go/types/unify.go

    		u.setHandle(x, hy)
    	}
    	return true
    }
    
    // asBoundTypeParam returns x.(*TypeParam) if x is a type parameter recorded with u.
    // Otherwise, the result is nil.
    func (u *unifier) asBoundTypeParam(x Type) *TypeParam {
    	if x, _ := Unalias(x).(*TypeParam); x != nil {
    		if _, found := u.handles[x]; found {
    			return x
    		}
    	}
    	return nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 16:24:39 UTC 2024
    - 27.9K bytes
    - Viewed (0)
  6. src/go/types/under.go

    // identical element types), the single underlying type is the restricted
    // channel type if the restrictions are always the same, or nil otherwise.
    func coreType(t Type) Type {
    	t = Unalias(t)
    	tpar, _ := t.(*TypeParam)
    	if tpar == nil {
    		return under(t)
    	}
    
    	var su Type
    	if tpar.underIs(func(u Type) bool {
    		if u == nil {
    			return false
    		}
    		if su != nil {
    			u = match(su, u)
    			if u == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 22:34:27 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/tools/internal/typeparams/coretype.go

    // NormalTerms returns a slice of terms representing the normalized structural
    // type restrictions of a type, if any.
    //
    // For all types other than *types.TypeParam, *types.Interface, and
    // *types.Union, this is just a single term with Tilde() == false and
    // Type() == typ. For *types.TypeParam, *types.Interface, and *types.Union, see
    // below.
    //
    // Structural type restrictions of a type parameter are created via
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types2/under.go

    // identical element types), the single underlying type is the restricted
    // channel type if the restrictions are always the same, or nil otherwise.
    func coreType(t Type) Type {
    	t = Unalias(t)
    	tpar, _ := t.(*TypeParam)
    	if tpar == nil {
    		return under(t)
    	}
    
    	var su Type
    	if tpar.underIs(func(u Type) bool {
    		if u == nil {
    			return false
    		}
    		if su != nil {
    			u = match(su, u)
    			if u == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 22:34:27 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  9. src/go/types/type.go

    package types
    
    // A Type represents a type of Go.
    // All types implement the Type interface.
    type Type interface {
    	// Underlying returns the underlying type of a type.
    	// Underlying types are never Named, TypeParam, or Alias types.
    	//
    	// See https://go.dev/ref/spec#Underlying_types.
    	Underlying() Type
    
    	// String returns a string representation of a type.
    	String() string
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 20:03:31 UTC 2024
    - 541 bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/tools/internal/facts/imports.go

    // by obtaining it from the internals of the gcexportdata decoder.
    func importMap(imports []*types.Package) map[string]*types.Package {
    	objects := make(map[types.Object]bool)
    	typs := make(map[types.Type]bool) // Named and TypeParam
    	packages := make(map[string]*types.Package)
    
    	var addObj func(obj types.Object)
    	var addType func(T types.Type)
    
    	addObj = func(obj types.Object) {
    		if !objects[obj] {
    			objects[obj] = true
    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