Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 36 for TypeParam (0.49 sec)

  1. src/go/internal/gcimporter/iimport.go

    				// typeparams being used in the method sig/body).
    				targs := baseType(recv.Type()).TypeArgs()
    				var rparams []*types.TypeParam
    				if targs.Len() > 0 {
    					rparams = make([]*types.TypeParam, targs.Len())
    					for i := range rparams {
    						rparams[i], _ = targs.At(i).(*types.TypeParam)
    					}
    				}
    				msig := r.signature(recv, rparams, nil)
    
    				named.AddMethod(types.NewFunc(mpos, r.currPkg, mname, msig))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 19.2K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/types2/infer.go

    	var maxUntyped map[*TypeParam]Type // lazily allocated (we may not need it)
    	for _, index := range untyped {
    		tpar := params.At(index).typ.(*TypeParam) // is type parameter (no alias) by construction of untyped
    		if u.at(tpar) == nil {
    			arg := args[index] // arg corresponding to tpar
    			if maxUntyped == nil {
    				maxUntyped = make(map[*TypeParam]Type)
    			}
    			max := maxUntyped[tpar]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 13:54:20 UTC 2024
    - 26.4K bytes
    - Viewed (0)
  3. src/go/types/infer.go

    	var maxUntyped map[*TypeParam]Type // lazily allocated (we may not need it)
    	for _, index := range untyped {
    		tpar := params.At(index).typ.(*TypeParam) // is type parameter (no alias) by construction of untyped
    		if u.at(tpar) == nil {
    			arg := args[index] // arg corresponding to tpar
    			if maxUntyped == nil {
    				maxUntyped = make(map[*TypeParam]Type)
    			}
    			max := maxUntyped[tpar]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 13:54:20 UTC 2024
    - 26.5K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. src/cmd/compile/internal/types2/signature.go

    				if p.Value == "_" {
    					if check.recvTParamMap == nil {
    						check.recvTParamMap = make(map[*syntax.Name]*TypeParam)
    					}
    					check.recvTParamMap[p] = tparams[i]
    				}
    			}
    			// determine receiver type to get its type parameters
    			// and the respective type parameter bounds
    			var recvTParams []*TypeParam
    			if rname != nil {
    				// recv should be a Named type (otherwise an error is reported elsewhere)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 21:33:05 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/types2/predicates.go

    	switch Unalias(t).(type) {
    	case *Basic, *Named, *TypeParam:
    		return true
    	}
    	return false
    }
    
    // isTypeLit reports whether t is a type literal.
    // This includes all non-defined types, but also basic types.
    // isTypeLit may be called with types that are not fully set up.
    func isTypeLit(t Type) bool {
    	switch Unalias(t).(type) {
    	case *Named, *TypeParam:
    		return false
    	}
    	return true
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 17.5K bytes
    - Viewed (0)
  10. src/go/types/predicates.go

    	switch Unalias(t).(type) {
    	case *Basic, *Named, *TypeParam:
    		return true
    	}
    	return false
    }
    
    // isTypeLit reports whether t is a type literal.
    // This includes all non-defined types, but also basic types.
    // isTypeLit may be called with types that are not fully set up.
    func isTypeLit(t Type) bool {
    	switch Unalias(t).(type) {
    	case *Named, *TypeParam:
    		return false
    	}
    	return true
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 17.6K bytes
    - Viewed (0)
Back to top