Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for newTypeParam (0.17 sec)

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

    	// P where P's core type is string
    	{
    		P := NewTypeName(nopos, nil, "P", nil) // [P string]
    		makeSig(NewTypeParam(P, NewInterfaceType(nil, []Type{Typ[String]})))
    	}
    
    	// P where P's core type is an (unnamed) slice
    	{
    		P := NewTypeName(nopos, nil, "P", nil) // [P []int]
    		makeSig(NewTypeParam(P, NewInterfaceType(nil, []Type{NewSlice(Typ[Int])})))
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 28.1K bytes
    - Viewed (0)
  2. src/go/types/issues_test.go

    	// P where P's core type is string
    	{
    		P := NewTypeName(nopos, nil, "P", nil) // [P string]
    		makeSig(NewTypeParam(P, NewInterfaceType(nil, []Type{Typ[String]})))
    	}
    
    	// P where P's core type is an (unnamed) slice
    	{
    		P := NewTypeName(nopos, nil, "P", nil) // [P []int]
    		makeSig(NewTypeParam(P, NewInterfaceType(nil, []Type{NewSlice(Typ[Int])})))
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 28.1K bytes
    - Viewed (0)
  3. api/go1.18.txt

    pkg go/types, func NewSignature //deprecated
    pkg go/types, func NewSignatureType(*Var, []*TypeParam, []*TypeParam, *Tuple, *Tuple, bool) *Signature
    pkg go/types, func NewTerm(bool, Type) *Term
    pkg go/types, func NewTypeParam(*TypeName, Type) *TypeParam
    pkg go/types, func NewUnion([]*Term) *Union
    pkg go/types, method (*ArgumentError) Error() string
    pkg go/types, method (*ArgumentError) Unwrap() error
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 17 20:31:46 UTC 2023
    - 13K bytes
    - Viewed (0)
  4. src/go/internal/gcimporter/ureader.go

    	for i := range r.dict.bounds {
    		pos := r.pos()
    		pkg, name := r.localIdent()
    
    		tname := types.NewTypeName(pos, pkg, name, nil)
    		r.dict.tparams[i] = types.NewTypeParam(tname, nil)
    	}
    
    	typs := make([]types.Type, len(r.dict.bounds))
    	for i, bound := range r.dict.bounds {
    		typs[i] = r.p.typIdx(bound, r.dict)
    	}
    
    	// TODO(mdempsky): This is subtle, elaborate further.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  5. src/go/internal/gcimporter/iimport.go

    		// Remove the "path" from the type param name that makes it unique,
    		// and revert any unique name used for blank typeparams.
    		name0 := tparamName(name)
    		tn := types.NewTypeName(pos, r.currPkg, name0, nil)
    		t := types.NewTypeParam(tn, nil)
    		// To handle recursive references to the typeparam within its
    		// bound, save the partial type in tparamIndex before reading the bounds.
    		id := ident{r.currPkg, name}
    		r.p.tparamIndex[id] = t
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 19.2K bytes
    - Viewed (0)
  6. src/go/types/infer.go

    	}
    
    	tparams2 := make([]*TypeParam, len(tparams))
    	for i, tparam := range tparams {
    		tname := NewTypeName(tparam.Obj().Pos(), tparam.Obj().Pkg(), tparam.Obj().Name(), nil)
    		tparams2[i] = NewTypeParam(tname, nil)
    		tparams2[i].index = tparam.index // == i
    	}
    
    	renameMap := makeRenameMap(tparams, tparams2)
    	for i, tparam := range tparams {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 13:54:20 UTC 2024
    - 26.5K bytes
    - Viewed (0)
  7. src/go/types/builtins.go

    		// The type parameter is placed in the current package so export/import
    		// works as expected.
    		tpar := NewTypeName(nopos, check.pkg, tp.obj.name, nil)
    		ptyp := check.newTypeParam(tpar, NewInterfaceType(nil, []Type{NewUnion(terms)})) // assigns type to tpar as a side-effect
    		ptyp.index = tp.index
    
    		return ptyp
    	}
    
    	return f(x.typ)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 27.2K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types2/infer.go

    	}
    
    	tparams2 := make([]*TypeParam, len(tparams))
    	for i, tparam := range tparams {
    		tname := NewTypeName(tparam.Obj().Pos(), tparam.Obj().Pkg(), tparam.Obj().Name(), nil)
    		tparams2[i] = NewTypeParam(tname, nil)
    		tparams2[i].index = tparam.index // == i
    	}
    
    	renameMap := makeRenameMap(tparams, tparams2)
    	for i, tparam := range tparams {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 13:54:20 UTC 2024
    - 26.4K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/types2/builtins.go

    		// The type parameter is placed in the current package so export/import
    		// works as expected.
    		tpar := NewTypeName(nopos, check.pkg, tp.obj.name, nil)
    		ptyp := check.newTypeParam(tpar, NewInterfaceType(nil, []Type{NewUnion(terms)})) // assigns type to tpar as a side-effect
    		ptyp.index = tp.index
    
    		return ptyp
    	}
    
    	return f(x.typ)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 27.1K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/types2/decl.go

    	//           constraints to make sure we don't rely on them if they
    	//           are not properly set yet.
    	tname := NewTypeName(name.Pos(), check.pkg, name.Value, nil)
    	tpar := check.newTypeParam(tname, Typ[Invalid]) // assigns type to tname as a side-effect
    	check.declare(check.scope, name, tname, scopePos)
    	return tpar
    }
    
    func (check *Checker) collectMethods(obj *TypeName) {
    	// get associated methods
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 29.6K bytes
    - Viewed (0)
Back to top