type go/types.Type
455 uses
go/types (current package)
api.go#L286: func (info *Info) TypeOf(e ast.Expr) Type {
api.go#L317: Type Type
api.go#L379: Type Type
api.go#L425: func AssertableTo(V *Interface, T Type) bool {
api.go#L439: func AssignableTo(V, T Type) bool {
api.go#L450: func ConvertibleTo(V, T Type) bool {
api.go#L459: func Implements(V Type, T *Interface) bool {
api.go#L474: func Identical(x, y Type) bool {
api.go#L480: func IdenticalIgnoreTags(x, y Type) bool {
array.go#L10: elem Type
array.go#L15: func NewArray(elem Type, len int64) *Array { return &Array{len: len, elem: elem} }
array.go#L22: func (a *Array) Elem() Type { return a.elem }
array.go#L24: func (t *Array) Underlying() Type { return t }
assignments.go#L20: func (check *Checker) assignment(x *operand, T Type, context string) {
assignments.go#L136: func (check *Checker) initVar(lhs *Var, x *operand, context string) Type {
assignments.go#L167: func (check *Checker) assignVar(lhs ast.Expr, x *operand) Type {
assignments.go#L242: func operandTypes(list []*operand) (res []Type) {
assignments.go#L250: func varTypes(list []*Var) (res []Type) {
assignments.go#L261: func (check *Checker) typesSummary(list []Type, variadic bool) string {
assignments.go#L363: var a [2]Type
assignments.go#L396: var a [2]Type
basic.go#L81: func (t *Basic) Underlying() Type { return t }
builtins.go#L85: var T Type
builtins.go#L199: if t.typeSet().underIs(func(t Type) bool {
builtins.go#L238: if !underIs(x.typ, func(u Type) bool {
builtins.go#L318: f := func(typ Type) Type {
builtins.go#L387: var key Type
builtins.go#L388: if !underIs(map_, func(u Type) bool {
builtins.go#L446: f := func(typ Type) Type {
builtins.go#L515: types := []Type{T}
builtins.go#L576: var params []Type
builtins.go#L578: params = make([]Type, nargs)
builtins.go#L802: func hasVarSize(t Type) bool {
builtins.go#L827: func (check *Checker) applyTypeFunc(f func(Type) Type, x *operand, id builtinId) Type {
builtins.go#L866: ptyp := check.newTypeParam(tpar, NewInterfaceType(nil, []Type{NewUnion(terms)})) // assigns type to tpar as a side-effect
builtins.go#L877: func makeSig(res Type, args ...Type) *Signature {
builtins.go#L893: func arrayPtrDeref(typ Type) Type {
call.go#L63: func (check *Checker) instantiateSignature(pos token.Pos, typ *Signature, targs []Type, xlist []ast.Expr) (res *Signature) {
call.go#L184: var targs []Type
call.go#L288: func (check *Checker) arguments(call *ast.CallExpr, sig *Signature, targs []Type, args []*operand, xlist []ast.Expr) (rsig *Signature) {
chan.go#L10: elem Type
chan.go#L24: func NewChan(dir ChanDir, elem Type) *Chan {
chan.go#L32: func (c *Chan) Elem() Type { return c.elem }
chan.go#L34: func (t *Chan) Underlying() Type { return t }
check.go#L169: func (check *Checker) validAlias(alias *TypeName, typ Type) {
check.go#L406: var typ Type
check.go#L444: func (check *Checker) recordTypeAndValue(x ast.Expr, mode operandMode, typ Type, val constant.Value) {
check.go#L479: func (check *Checker) recordCommaOkTypes(x ast.Expr, a [2]Type) {
check.go#L511: func (check *Checker) recordInstance(expr ast.Expr, targs []Type, typ Type) {
check.go#L562: func (check *Checker) recordSelection(x *ast.SelectorExpr, kind SelectionKind, recv Type, obj Object, index []int, indirect bool) {
context.go#L25: originIDs map[Type]int // origin type -> unique ID
context.go#L29: orig Type
context.go#L30: targs []Type
context.go#L31: instance Type // = orig[targs]
context.go#L38: originIDs: make(map[Type]int),
context.go#L45: func (ctxt *Context) instanceHash(orig Type, targs []Type) string {
context.go#L67: func (ctxt *Context) lookup(h string, orig Type, targs []Type) Type {
context.go#L88: func (ctxt *Context) update(h string, orig Type, targs []Type, inst Type) Type {
context.go#L114: func (ctxt *Context) getID(t Type) int {
conversions.go#L16: func (check *Checker) conversion(x *operand, T Type) {
conversions.go#L19: constConvertibleTo := func(T Type, val *constant.Value) bool {
conversions.go#L50: ok = T.(*TypeParam).underIs(func(u Type) bool {
conversions.go#L129: func (x *operand) convertibleTo(check *Checker, T Type, cause *string) bool {
conversions.go#L269: func isUintptr(typ Type) bool {
conversions.go#L274: func isUnsafePointer(typ Type) bool {
conversions.go#L279: func isPointer(typ Type) bool {
conversions.go#L284: func isBytesOrRunes(typ Type) bool {
decl.go#L524: func (check *Checker) isImportedConstraint(typ Type) bool {
decl.go#L536: var rhs Type
decl.go#L628: var bound Type
decl.go#L651: func (check *Checker) bound(x ast.Expr) Type {
errors.go#L100: case Type:
errors.go#L102: case []Type:
expr.go#L60: type opPredicates map[token.Token]func(Type) bool
expr.go#L149: func underIs(typ Type, f func(Type) bool) bool {
expr.go#L455: func (check *Checker) invalidConversion(code errorCode, x *operand, target Type) {
expr.go#L475: func (check *Checker) updateExprType(x ast.Expr, typ Type, final bool) {
expr.go#L479: func (check *Checker) updateExprType0(parent, x ast.Expr, typ Type, final bool) {
expr.go#L605: func (check *Checker) convertUntyped(x *operand, target Type) {
expr.go#L632: func (check *Checker) implicitTypeAndValue(x *operand, target Type) (Type, constant.Value, errorCode) {
expr.go#L692: if !u.typeSet().underIs(func(u Type) bool {
expr.go#L855: func (check *Checker) incomparableCause(typ Type) string {
expr.go#L869: func (check *Checker) kindString(typ Type) string {
expr.go#L1198: func (check *Checker) rawExpr(x *operand, e ast.Expr, hint Type, allowGeneric bool) exprKind {
expr.go#L1246: func (check *Checker) exprInternal(x *operand, e ast.Expr, hint Type) exprKind {
expr.go#L1318: var typ, base Type
expr.go#L1471: visited := make(map[any][]Type, len(e.Elts))
expr.go#L1594: var base Type
expr.go#L1595: if !underIs(x.typ, func(u Type) bool {
expr.go#L1684: func (check *Checker) typeAssertion(e ast.Expr, x *operand, T Type, typeSwitch bool) {
expr.go#L1720: func (check *Checker) exprWithHint(x *operand, e ast.Expr, hint Type) {
index.go#L108: var key, elem Type // key != nil: we must have all maps
index.go#L111: if typ.typeSet().underIs(func(u Type) bool {
index.go#L113: var k, e Type // k is only set for maps
index.go#L347: func (check *Checker) index(index ast.Expr, max int64) (typ Type, val int64) {
index.go#L415: func (check *Checker) indexedElts(elts []ast.Expr, typ Type, length int64) int64 {
infer.go#L32: func (check *Checker) infer(posn positioner, tparams []*TypeParam, targs []Type, params *Tuple, args []*operand) (result []Type) {
infer.go#L179: targs2 := make([]Type, n)
infer.go#L207: errorf := func(kind string, tpar, targ Type, arg *operand) {
infer.go#L358: func isParameterized(tparams []*TypeParam, typ Type) bool {
infer.go#L360: seen: make(map[Type]bool),
infer.go#L367: seen map[Type]bool
infer.go#L371: func (w *tpWalker) isParameterized(typ Type) (res bool) {
infer.go#L450: func (w *tpWalker) isParameterizedTypeList(list []Type) bool {
infer.go#L467: func (check *Checker) inferB(posn positioner, tparams []*TypeParam, targs []Type) (types []Type, index int) {
infer.go#L606: w := cycleFinder{tparams, types, make(map[Type]bool)}
infer.go#L698: types []Type
infer.go#L699: seen map[Type]bool
infer.go#L702: func (w *cycleFinder) typ(typ Type) {
instantiate.go#L42: func Instantiate(ctxt *Context, orig Type, targs []Type, validate bool) (Type, error) {
instantiate.go#L66: func (check *Checker) instance(pos token.Pos, orig Type, targs []Type, ctxt *Context) (res Type) {
instantiate.go#L82: named.resolver = func(ctxt *Context, n *Named) (*TypeParamList, Type, *methodList) {
instantiate.go#L136: func (check *Checker) verify(pos token.Pos, tparams []*TypeParam, targs []Type) (int, error) {
instantiate.go#L156: func (check *Checker) implements(V, T Type) error {
instantiate.go#L230: var alt Type
interface.go#L20: embeddeds []Type // ordered list of explicitly embedded elements
interface.go#L40: tnames := make([]Type, len(embeddeds))
interface.go#L53: func NewInterfaceType(methods []*Func, embeddeds []Type) *Interface {
interface.go#L110: func (t *Interface) EmbeddedType(i int) Type { return t.embeddeds[i] }
interface.go#L147: func (t *Interface) Underlying() Type { return t }
interface.go#L159: addEmbedded := func(pos token.Pos, typ Type) {
interface.go#L202: var recvTyp Type = ityp
lookup.go#L44: func LookupFieldOrMethod(T Type, addressable bool, pkg *Package, name string) (obj Object, index []int, indirect bool) {
lookup.go#L89: func lookupFieldOrMethod(T Type, addressable bool, pkg *Package, name string, foldCase bool) (obj Object, index []int, indirect bool) {
lookup.go#L220: typ Type
lookup.go#L235: prev := make(map[Type]int) // index at which type was previously seen
lookup.go#L249: func lookupType(m map[Type]int, typ Type) (int, bool) {
lookup.go#L294: func MissingMethod(V Type, T *Interface, static bool) (method *Func, wrongType bool) {
lookup.go#L308: func (check *Checker) missingMethod(V Type, T *Interface, static bool) (method, alt *Func) {
lookup.go#L374: func (check *Checker) missingMethodReason(V, T Type, m, alt *Func) string {
lookup.go#L407: func isInterfacePtr(T Type) bool {
lookup.go#L413: func (check *Checker) interfacePtrError(T Type) string {
lookup.go#L438: func (check *Checker) assertableTo(V *Interface, T Type) (method, wrongType *Func) {
lookup.go#L452: func (check *Checker) newAssertableTo(V *Interface, T Type) error {
lookup.go#L464: func deref(typ Type) (Type, bool) {
lookup.go#L480: func derefStructPtr(typ Type) Type {
map.go#L9: key, elem Type
map.go#L13: func NewMap(key, elem Type) *Map {
map.go#L18: func (m *Map) Key() Type { return m.key }
map.go#L21: func (m *Map) Elem() Type { return m.elem }
map.go#L23: func (t *Map) Underlying() Type { return t }
methodset.go#L72: func NewMethodSet(T Type) *MethodSet {
mono.go#L79: typ Type
mono.go#L170: func (w *monoGraph) recordInstance(pkg *Package, pos token.Pos, tparams []*TypeParam, targs []Type, xlist []ast.Expr) {
mono.go#L181: func (w *monoGraph) assign(pkg *Package, pos token.Pos, tpar *TypeParam, targ Type) {
mono.go#L195: flow := func(src int, typ Type) {
mono.go#L206: var do func(typ Type)
mono.go#L207: do = func(typ Type) {
mono.go#L326: func (w *monoGraph) addEdge(dst, src, weight int, pos token.Pos, typ Type) {
named.go#L17: fromRHS Type // type (on RHS of declaration) this *Named type is derived of (for cycle reporting)
named.go#L18: underlying Type // possibly a *Named during setup; never a *Named once set up completely
named.go#L30: resolver func(*Context, *Named) (tparams *TypeParamList, underlying Type, methods *methodList)
named.go#L37: func NewNamed(obj *TypeName, underlying Type, methods []*Func) *Named {
named.go#L65: func (check *Checker) newNamed(obj *TypeName, orig *Named, underlying Type, tparams *TypeParamList, methods *methodList) *Named {
named.go#L188: var rtyp Type
named.go#L201: func (t *Named) SetUnderlying(underlying Type) {
named.go#L226: func (t *Named) Underlying() Type { return t.resolve(nil).underlying }
named.go#L250: func (n0 *Named) under() Type {
named.go#L320: func (n *Named) setUnderlying(typ Type) {
named.go#L358: func expandNamed(ctxt *Context, n *Named, instPos token.Pos) (tparams *TypeParamList, underlying Type, methods *methodList) {
named.go#L410: func safeUnderlying(typ Type) Type {
object.go#L23: Type() Type // object type
object.go#L40: setType(Type)
object.go#L87: typ Type
object.go#L117: func colorFor(t Type) color {
object.go#L139: func (obj *object) Type() Type { return obj.typ }
object.go#L155: func (obj *object) setType(typ Type) { obj.typ = typ }
object.go#L208: func NewConst(pos token.Pos, pkg *Package, name string, typ Type, val constant.Value) *Const {
object.go#L229: func NewTypeName(pos token.Pos, pkg *Package, name string, typ Type) *TypeName {
object.go#L235: func _NewTypeNameLazy(pos token.Pos, pkg *Package, name string, load func(named *Named) (tparams []*TypeParam, underlying Type, methods []*Func)) *TypeName {
object.go#L238: resolve := func(_ *Context, t *Named) (*TypeParamList, Type, *methodList) {
object.go#L289: func NewVar(pos token.Pos, pkg *Package, name string, typ Type) *Var {
object.go#L294: func NewParam(pos token.Pos, pkg *Package, name string, typ Type) *Var {
object.go#L301: func NewField(pos token.Pos, pkg *Package, name string, typ Type, embedded bool) *Var {
object.go#L329: var typ Type
operand.go#L56: typ Type
operand.go#L234: func (x *operand) assignableTo(check *Checker, T Type, reason *string) (bool, errorCode) {
pointer.go#L9: base Type // element type
pointer.go#L13: func NewPointer(elem Type) *Pointer { return &Pointer{base: elem} }
pointer.go#L16: func (p *Pointer) Elem() Type { return p.base }
pointer.go#L18: func (t *Pointer) Underlying() Type { return t }
predicates.go#L15: func isBoolean(t Type) bool { return isBasic(t, IsBoolean) }
predicates.go#L16: func isInteger(t Type) bool { return isBasic(t, IsInteger) }
predicates.go#L17: func isUnsigned(t Type) bool { return isBasic(t, IsUnsigned) }
predicates.go#L18: func isFloat(t Type) bool { return isBasic(t, IsFloat) }
predicates.go#L19: func isComplex(t Type) bool { return isBasic(t, IsComplex) }
predicates.go#L20: func isNumeric(t Type) bool { return isBasic(t, IsNumeric) }
predicates.go#L21: func isString(t Type) bool { return isBasic(t, IsString) }
predicates.go#L22: func isIntegerOrFloat(t Type) bool { return isBasic(t, IsInteger|IsFloat) }
predicates.go#L23: func isConstType(t Type) bool { return isBasic(t, IsConstType) }
predicates.go#L28: func isBasic(t Type, info BasicInfo) bool {
predicates.go#L39: func allBoolean(typ Type) bool { return allBasic(typ, IsBoolean) }
predicates.go#L40: func allInteger(typ Type) bool { return allBasic(typ, IsInteger) }
predicates.go#L41: func allUnsigned(typ Type) bool { return allBasic(typ, IsUnsigned) }
predicates.go#L42: func allNumeric(typ Type) bool { return allBasic(typ, IsNumeric) }
predicates.go#L43: func allString(typ Type) bool { return allBasic(typ, IsString) }
predicates.go#L44: func allOrdered(typ Type) bool { return allBasic(typ, IsOrdered) }
predicates.go#L45: func allNumericOrString(typ Type) bool { return allBasic(typ, IsNumeric|IsString) }
predicates.go#L51: func allBasic(t Type, info BasicInfo) bool {
predicates.go#L61: func hasName(t Type) bool {
predicates.go#L72: func isTyped(t Type) bool {
predicates.go#L80: func isUntyped(t Type) bool {
predicates.go#L85: func IsInterface(t Type) bool {
predicates.go#L91: func isTypeParam(t Type) bool {
predicates.go#L99: func isGeneric(t Type) bool {
predicates.go#L106: func Comparable(T Type) bool {
predicates.go#L112: func comparable(T Type, dynamic bool, seen map[Type]bool, reportf func(string, ...interface{})) bool {
predicates.go#L117: seen = make(map[Type]bool)
predicates.go#L153: func hasNil(t Type) bool {
predicates.go#L160: return !isTypeParam(t) || u.typeSet().underIs(func(u Type) bool {
predicates.go#L178: func identical(x, y Type, cmpTags bool, p *ifacePair) bool {
predicates.go#L277: var targs []Type
predicates.go#L434: func identicalInstance(xorig Type, xargs []Type, yorig Type, yargs []Type) bool {
predicates.go#L451: func Default(t Type) Type {
scope.go#L281: func (*lazyObject) Type() Type { panic("unreachable") }
scope.go#L287: func (*lazyObject) setType(Type) { panic("unreachable") }
selection.go#L42: recv Type // type of x
selection.go#L52: func (s *Selection) Recv() Type { return s.recv }
selection.go#L60: func (s *Selection) Type() Type {
signature.go#L95: func (t *Signature) Underlying() Type { return t }
signature.go#L238: underIs(T, func(u Type) bool {
sizes.go#L13: Alignof(T Type) int64
sizes.go#L21: Sizeof(T Type) int64
sizes.go#L48: func (s *StdSizes) Alignof(T Type) int64 {
sizes.go#L125: func (s *StdSizes) Sizeof(T Type) int64 {
sizes.go#L214: func (conf *Config) alignof(T Type) int64 {
sizes.go#L249: func (conf *Config) offsetof(typ Type, index []int) int64 {
sizes.go#L259: func (conf *Config) sizeof(T Type) int64 {
slice.go#L9: elem Type
slice.go#L13: func NewSlice(elem Type) *Slice { return &Slice{elem: elem} }
slice.go#L16: func (s *Slice) Elem() Type { return s.elem }
slice.go#L18: func (t *Slice) Underlying() Type { return t }
stmt.go#L233: typ Type
stmt.go#L285: func (check *Checker) caseTypes(x *operand, types []ast.Expr, seen map[Type]ast.Expr) (T Type) {
stmt.go#L702: seen := make(map[Type]ast.Expr) // map of seen types to positions
stmt.go#L830: var key, val Type
stmt.go#L868: rhs := [2]Type{key, val} // key, val may be nil
stmt.go#L940: func rangeKeyVal(typ Type) (key, val Type) {
struct.go#L55: func (t *Struct) Underlying() Type { return t }
struct.go#L82: var typ Type
subst.go#L11: type substMap map[*TypeParam]Type
subst.go#L15: func makeSubstMap(tpars []*TypeParam, targs []Type) substMap {
subst.go#L39: func (m substMap) lookup(tpar *TypeParam) Type {
subst.go#L52: func (check *Checker) subst(pos token.Pos, typ Type, smap substMap, ctxt *Context) Type {
subst.go#L82: func (subst *subster) typ(typ Type) Type {
subst.go#L221: var newTArgs []Type
subst.go#L237: newTArgs = make([]Type, t.orig.TypeParams().Len())
subst.go#L283: func (subst *subster) typOrNil(typ Type) Type {
subst.go#L299: func substVar(v *Var, typ Type) *Var {
subst.go#L361: func (subst *subster) typeList(in []Type) (out []Type, copied bool) {
subst.go#L368: new := make([]Type, len(in))
subst.go#L403: func replaceRecvType(in []*Func, old, new Type) (out []*Func, copied bool) {
termlist.go#L126: func (xl termlist) includes(t Type) bool {
tuple.go#L33: func (t *Tuple) Underlying() Type { return t }
type.go#L9: type Type interface {
type.go#L11: Underlying() Type
type.go#L21: func under(t Type) Type {
type.go#L34: func coreType(t Type) Type {
type.go#L40: var su Type
type.go#L41: if tpar.underIs(func(u Type) bool {
type.go#L63: func coreString(t Type) Type {
type.go#L69: var su Type
type.go#L71: if tpar.underIs(func(u Type) bool {
type.go#L102: func match(x, y Type) Type {
typelists.go#L28: type TypeList struct{ types []Type }
typelists.go#L31: func newTypeList(list []Type) *TypeList {
typelists.go#L43: func (l *TypeList) At(i int) Type { return l.types[i] }
typelists.go#L48: func (l *TypeList) list() []Type {
typeparam.go#L26: bound Type // any type, but underlying is eventually *Interface for correct programs (see TypeParam.iface)
typeparam.go#L35: func NewTypeParam(obj *TypeName, constraint Type) *TypeParam {
typeparam.go#L40: func (check *Checker) newTypeParam(obj *TypeName, constraint Type) *TypeParam {
typeparam.go#L71: func (t *TypeParam) Constraint() Type {
typeparam.go#L81: func (t *TypeParam) SetConstraint(bound Type) {
typeparam.go#L91: func (t *TypeParam) Underlying() Type {
typeparam.go#L127: ityp = NewInterfaceType(nil, []Type{bound})
typeparam.go#L156: func (t *TypeParam) underIs(f func(Type) bool) bool {
typeset.go#L42: func (s *_TypeSet) IsComparable(seen map[Type]bool) bool {
typeset.go#L128: func (s *_TypeSet) underIs(f func(Type) bool) bool {
typestring.go#L49: func TypeString(typ Type, qf Qualifier) string {
typestring.go#L53: func typeString(typ Type, qf Qualifier, debug bool) string {
typestring.go#L64: func WriteType(buf *bytes.Buffer, typ Type, qf Qualifier) {
typestring.go#L78: seen map[Type]bool
typestring.go#L86: return &typeWriter{buf, make(map[Type]bool), qf, nil, nil, false}
typestring.go#L91: return &typeWriter{buf, make(map[Type]bool), nil, ctxt, nil, false}
typestring.go#L119: func (w *typeWriter) typ(typ Type) {
typestring.go#L357: func (w *typeWriter) typeList(list []Type) {
typestring.go#L370: var prev Type
typeterm.go#L16: typ Type
typeterm.go#L107: func (x *term) includes(t Type) bool {
typexpr.go#L138: func (check *Checker) typ(e ast.Expr) Type {
typexpr.go#L145: func (check *Checker) varType(e ast.Expr) Type {
typexpr.go#L153: func (check *Checker) validVarType(e ast.Expr, typ Type) {
typexpr.go#L181: func (check *Checker) definedType(e ast.Expr, def *Named) Type {
typexpr.go#L195: func (check *Checker) genericType(e ast.Expr, reason *string) Type {
typexpr.go#L211: func goTypeName(typ Type) string {
typexpr.go#L218: func (check *Checker) typInternal(e0 ast.Expr, def *Named) (T Type) {
typexpr.go#L224: var under Type
typexpr.go#L393: func (check *Checker) instantiatedType(ix *typeparams.IndexExpr, def *Named) (res Type) {
typexpr.go#L448: inst.resolver = func(ctxt *Context, n *Named) (*TypeParamList, Type, *methodList) {
typexpr.go#L541: func (check *Checker) typeList(list []ast.Expr) []Type {
typexpr.go#L542: res := make([]Type, len(list)) // res != nil even if len(list) == 0
unify.go#L66: types []Type // inferred types, shared by x and y
unify.go#L84: func (u *unifier) unify(x, y Type) bool {
unify.go#L187: func (d *tparamsList) index(typ Type) int {
unify.go#L223: func (d *tparamsList) at(i int) Type {
unify.go#L232: func (d *tparamsList) set(i int, typ Type) {
unify.go#L265: func (d *tparamsList) types() (list []Type, index int) {
unify.go#L266: list = make([]Type, len(d.tparams))
unify.go#L278: func (u *unifier) nifyEq(x, y Type, p *ifacePair) bool {
unify.go#L286: func (u *unifier) nify(x, y Type, p *ifacePair) (result bool) {
union.go#L32: func (u *Union) Underlying() Type { return u }
union.go#L39: func NewTerm(tilde bool, typ Type) *Term { return &Term{tilde, typ} }
union.go#L42: func (t *Term) Type() Type { return t.typ }
union.go#L53: func parseUnion(check *Checker, uexpr ast.Expr) Type {
union.go#L59: var u Type
universe.go#L25: universeByte Type // uint8 alias, but has name "byte"
universe.go#L26: universeRune Type // int32 alias, but has name "rune"
universe.go#L28: universeError Type
validtype.go#L23: func (check *Checker) validType0(typ Type, env *tparamEnv, path []Object) typeInfo {
golang.org/x/exp/apidiff
apidiff.go#L43: correspondMap map[*types.TypeName]types.Type
apidiff.go#L54: correspondMap: map[*types.TypeName]types.Type{},
apidiff.go#L187: func (d *differ) checkCorrespondence(obj types.Object, part string, old, new types.Type) {
apidiff.go#L193: func (d *differ) typeChanged(obj types.Object, part string, old, new types.Type) {
apidiff.go#L204: func removeNamesFromSignature(t types.Type) types.Type {
compatibility.go#L9: func (d *differ) checkCompatible(otn *types.TypeName, old, new types.Type) {
compatibility.go#L261: func (d *differ) checkCompatibleDefined(otn *types.TypeName, old *types.Named, new types.Type) {
compatibility.go#L284: func (d *differ) checkMethodSet(otn *types.TypeName, oldt, newt types.Type, addcompat bool) {
compatibility.go#L334: func exportedMethods(t types.Type) map[string]types.Object {
compatibility.go#L346: func receiverType(method types.Object) types.Type {
correspondence.go#L17: func (d *differ) correspond(old, new types.Type) bool {
correspondence.go#L29: func (d *differ) corr(old, new types.Type, p *ifacePair) bool {
correspondence.go#L159: func (d *differ) establishCorrespondence(old *types.Named, new types.Type) bool {
correspondence.go#L223: func typesEquivalent(old, new types.Type) bool {
golang.org/x/tools/internal/gcimporter
bexport.go#L69: typIndex map[types.Type]int
bexport.go#L110: typIndex: make(map[types.Type]int),
bexport.go#L298: func (p *exporter) typ(t types.Type) {
bexport.go#L521: func basetypeName(typ types.Type) string {
bimport.go#L34: typList []types.Type // in order of appearance
bimport.go#L398: func (p *importer) record(t types.Type) {
bimport.go#L406: elem types.Type
bimport.go#L409: func (t *dddSlice) Underlying() types.Type { return t }
bimport.go#L420: func (p *importer) typ(parent *types.Package, tname *types.Named) types.Type {
bimport.go#L550: var embeddeds []types.Type
bimport.go#L995: var predecl []types.Type // initialized lazily
bimport.go#L997: func predeclared() []types.Type {
bimport.go#L1001: predecl = []types.Type{ // basic types
bimport.go#L1052: func (t anyType) Underlying() types.Type { return t }
gcimporter.go#L254: func deref(typ types.Type) types.Type {
iexport.go#L106: typIndex: map[types.Type]uint64{},
iexport.go#L338: typIndex map[types.Type]uint64
iexport.go#L676: func (w *exportWriter) typ(t types.Type, pkg *types.Package) {
iexport.go#L690: func (p *iexporter) typOff(t types.Type, pkg *types.Package) uint64 {
iexport.go#L705: func (w *exportWriter) doTyp(t types.Type, pkg *types.Package) {
iexport.go#L910: func (w *exportWriter) value(typ types.Type, v constant.Value) {
iexport.go#L992: func (w *exportWriter) mpint(x *big.Int, typ types.Type) {
iexport.go#L1060: func (w *exportWriter) mpfloat(f *big.Float, typ types.Type) {
iimport.go#L172: typCache: make(map[uint64]types.Type),
iimport.go#L175: tparamIndex: make(map[ident]types.Type),
iimport.go#L285: constraint types.Type
iimport.go#L304: typCache map[uint64]types.Type
iimport.go#L305: tparamIndex map[ident]types.Type
iimport.go#L430: func (p *iimporter) typAt(off uint64, base *types.Named) types.Type {
iimport.go#L455: func canReuse(def *types.Named, rhs types.Type) bool {
iimport.go#L587: func (r *importReader) value() (typ types.Type, val constant.Value) {
iimport.go#L762: func (r *importReader) typ() types.Type {
iimport.go#L766: func isInterface(t types.Type) bool {
iimport.go#L774: func (r *importReader) doType(base *types.Named) (res types.Type) {
iimport.go#L829: embeddeds := make([]types.Type, r.uint64())
iimport.go#L877: targs := make([]types.Type, len)
iimport.go#L968: func baseType(typ types.Type) *types.Named {
newInterface11.go#L12: func newInterface(methods []*types.Func, embeddeds []types.Type) *types.Interface {
support_go118.go#L15: func additionalPredeclared() []types.Type {
support_go118.go#L16: return []types.Type{
ureader_yes.go#L34: typs []types.Type
ureader_yes.go#L40: laterFors map[types.Type]int
ureader_yes.go#L73: func (pr *pkgReader) laterFor(t types.Type, fn func()) {
ureader_yes.go#L75: pr.laterFors = make(map[types.Type]int)
ureader_yes.go#L97: typs: make([]types.Type, input.NumElems(pkgbits.RelocType)),
ureader_yes.go#L151: derivedTypes []types.Type // lazily instantiated from derived
ureader_yes.go#L298: func (r *reader) typ() types.Type {
ureader_yes.go#L310: func (pr *pkgReader) typIdx(info typeInfo, dict *readerDict) types.Type {
ureader_yes.go#L312: var where *types.Type
ureader_yes.go#L324: var typ types.Type
ureader_yes.go#L342: func (r *reader) doTyp() (res types.Type) {
ureader_yes.go#L417: embeddeds := make([]types.Type, r.Len())
ureader_yes.go#L481: func (r *reader) obj() (types.Object, []types.Type) {
ureader_yes.go#L489: targs := make([]types.Type, r.Len())
ureader_yes.go#L562: setUnderlying := func(underlying types.Type) {
ureader_yes.go#L576: embeds := make([]types.Type, iface.NumEmbeddeds())
ureader_yes.go#L643: dict.derivedTypes = make([]types.Type, len(dict.derived))
ureader_yes.go#L681: typs := make([]types.Type, len(r.dict.bounds))
golang.org/x/tools/internal/typeparams
common.go#L75: func IsTypeParam(t types.Type) bool {
common.go#L135: func GenericAssignableTo(ctxt *Context, V, T types.Type) bool {
common.go#L163: var targs []types.Type
coretype.go#L14: func CoreType(T types.Type) types.Type {
coretype.go#L111: func _NormalTerms(typ types.Type) ([]*Term, error) {
normalize.go#L95: func computeTermSet(typ types.Type) ([]*Term, error) {
normalize.go#L96: tset, err := computeTermSetInternal(typ, make(map[types.Type]*termSet), 0)
normalize.go#L127: func computeTermSetInternal(t types.Type, seen map[types.Type]*termSet, depth int) (res *termSet, err error) {
normalize.go#L216: func under(t types.Type) types.Type {
termlist.go#L131: func (xl termlist) includes(t types.Type) bool {
typeparams_go118.go#L44: func NewTypeParam(name *types.TypeName, constraint types.Type) *TypeParam {
typeparams_go118.go#L49: func SetTypeParamConstraint(tparam *TypeParam, constraint types.Type) {
typeparams_go118.go#L106: func NamedTypeOrigin(named *types.Named) types.Type {
typeparams_go118.go#L114: func NewTerm(tilde bool, typ types.Type) *Term {
typeparams_go118.go#L149: func Instantiate(ctxt *Context, typ types.Type, targs []types.Type, validate bool) (types.Type, error) {
typeterm.go#L20: typ types.Type
typeterm.go#L111: func (x *term) includes(t types.Type) bool {