type go/types.Interface
138 uses
go/types (current package)
api_predicates.go#L19: func AssertableTo(V *Interface, T Type) bool {
api_predicates.go#L53: func Implements(V Type, T *Interface) bool {
api_predicates.go#L70: func Satisfies(V Type, T *Interface) bool {
builtins.go#L188: case *Interface:
call.go#L219: if t, _ := T.Underlying().(*Interface); t != nil && !isTypeParam(T) {
decl.go#L492: u, _ := named.Underlying().(*Interface)
decl.go#L654: if t, _ := t.(*Interface); t != nil {
expr.go#L441: case *Interface:
expr.go#L1107: if _, ok := x.typ().Underlying().(*Interface); !ok {
gcsizes.go#L49: case *Slice, *Interface:
gcsizes.go#L154: case *Interface:
hash.go#L71: case *Interface:
hash.go#L253: case *Interface:
index.go#L126: case *Interface:
infer.go#L608: case *Interface:
infer.go#L763: case *Interface:
instantiate.go#L258: Ti, _ := Tu.(*Interface)
instantiate.go#L280: Vi, _ := Vu.(*Interface)
instantiate.go#L390: case *Interface:
interface.go#L17: type Interface struct {
interface.go#L29: func (t *Interface) typeSet() *_TypeSet { return computeInterfaceTypeSet(t.check, nopos, t) }
interface.go#L32: var emptyInterface = Interface{complete: true, tset: &topTypeSet}
interface.go#L39: func NewInterface(methods []*Func, embeddeds []*Named) *Interface {
interface.go#L53: func NewInterfaceType(methods []*Func, embeddeds []Type) *Interface {
interface.go#L77: func (check *Checker) newInterface() *Interface {
interface.go#L78: typ := &Interface{check: check}
interface.go#L89: func (t *Interface) MarkImplicit() {
interface.go#L94: func (t *Interface) NumExplicitMethods() int { return len(t.methods) }
interface.go#L98: func (t *Interface) ExplicitMethod(i int) *Func { return t.methods[i] }
interface.go#L101: func (t *Interface) NumEmbeddeds() int { return len(t.embeddeds) }
interface.go#L107: func (t *Interface) Embedded(i int) *Named { return asNamed(t.embeddeds[i]) }
interface.go#L110: func (t *Interface) EmbeddedType(i int) Type { return t.embeddeds[i] }
interface.go#L113: func (t *Interface) NumMethods() int { return t.typeSet().NumMethods() }
interface.go#L117: func (t *Interface) Method(i int) *Func { return t.typeSet().Method(i) }
interface.go#L120: func (t *Interface) Empty() bool { return t.typeSet().IsAll() }
interface.go#L123: func (t *Interface) IsComparable() bool { return t.typeSet().IsComparable(nil) }
interface.go#L127: func (t *Interface) IsMethodSet() bool { return t.typeSet().IsMethodSet() }
interface.go#L130: func (t *Interface) IsImplicit() bool { return t.implicit }
interface.go#L139: func (t *Interface) Complete() *Interface {
interface.go#L147: func (t *Interface) Underlying() Type { return t }
interface.go#L148: func (t *Interface) String() string { return TypeString(t, nil) }
interface.go#L153: func (t *Interface) cleanup() {
interface.go#L159: func (check *Checker) interfaceType(ityp *Interface, iface *ast.InterfaceType, def *TypeName) {
iter.go#L20: func (t *Interface) Methods() iter.Seq[*Func] {
iter.go#L34: func (t *Interface) ExplicitMethods() iter.Seq[*Func] {
iter.go#L47: func (t *Interface) EmbeddedTypes() iter.Seq[Type] {
lookup.go#L161: if _, ok := typ.Underlying().(*Interface); ok {
lookup.go#L243: case *Interface:
lookup.go#L368: func MissingMethod(V Type, T *Interface, static bool) (method *Func, wrongType bool) {
lookup.go#L382: methods := T.Underlying().(*Interface).typeSet().methods // T must be an interface
lookup.go#L403: if u, _ := V.Underlying().(*Interface); u != nil {
methodset.go#L157: case *Interface:
mono.go#L246: case *Interface:
named.go#L789: if iface, _ := rhs.(*Interface); iface != nil {
object.go#L661: if _, ok := recv.Type().(*Interface); ok {
operand.go#L265: case *Interface:
operand.go#L379: if _, ok := Tu.(*Interface); ok && Tp == nil || isInterfacePtr(Tu) {
operand.go#L394: if Vi, _ := Vu.(*Interface); Vi != nil && Vp == nil {
predicates.go#L113: _, ok := t.Underlying().(*Interface)
predicates.go#L134: iface, _ := safeUnderlying(tpar.bound).(*Interface)
predicates.go#L191: case *Interface:
predicates.go#L217: case *Interface:
predicates.go#L237: x, y *Interface
predicates.go#L393: case *Interface:
predicates.go#L401: if y, ok := y.(*Interface); ok {
signature.go#L496: case *Pointer, *Interface:
sizes.go#L87: case *Slice, *Interface:
sizes.go#L221: case *Interface:
stmt.go#L359: func (check *Checker) caseTypes_currently_unused(x *operand, xtyp *Interface, types []ast.Expr, seen map[string]ast.Expr) Type {
struct.go#L160: case *Interface:
subst.go#L267: case *Interface:
typeparam.go#L114: func (t *TypeParam) iface() *Interface {
typeparam.go#L118: var ityp *Interface
typeparam.go#L125: case *Interface:
typeset.go#L155: func computeInterfaceTypeSet(check *Checker, pos token.Pos, ityp *Interface) *_TypeSet {
typeset.go#L271: case *Interface:
typeset.go#L387: if ui, _ := u.(*Interface); ui != nil {
typestring.go#L215: case *Interface:
typexpr.go#L164: if t, _ := typ.Underlying().(*Interface); t != nil {
unify.go#L276: func asInterface(x Type) (i *Interface) {
unify.go#L278: i, _ = x.Underlying().(*Interface)
unify.go#L668: case *Interface:
unify.go#L675: if y, ok := y.(*Interface); ok {
union.go#L98: f, _ := u.(*Interface)
universe.go#L98: ityp := &Interface{methods: []*Func{err}, complete: true}
universe.go#L116: NewNamed(obj, &Interface{complete: true, tset: &_TypeSet{nil, allTermlist, true}}, nil)
validtype.go#L69: case *Interface:
go.pact.im/x/plumb/internal/discover
discover.go#L725: if iface, ok := owner.Underlying().(*types.Interface); ok && !iface.IsMethodSet() {
go.pact.im/x/plumb/internal/emit
name.go#L89: case *types.Interface:
go.pact.im/x/plumb/internal/gotypes
cmp.go#L100: case *types.Interface:
cmp.go#L101: b := b.(*types.Interface)
cmp.go#L178: case *types.Interface:
gotypes.go#L152: iface, ok := c.Underlying().(*types.Interface)
gotypes.go#L207: if _, ok := t.(*types.Interface); ok {
subst.go#L60: case *types.Interface:
unify.go#L78: case *types.Interface:
unify.go#L81: c, ok := concrete.(*types.Interface)
unify.go#L195: case *types.Interface:
walk.go#L71: case *types.Interface:
walk.go#L162: case *types.Interface:
go.pact.im/x/plumb/internal/solve
instance.go#L165: if iface, ok := owner.Underlying().(*types.Interface); ok {
golang.org/x/exp/apidiff
apidiff.go#L208: oIface, ok := otn1.Type().Underlying().(*types.Interface)
apidiff.go#L212: nIface, ok := nt1.Underlying().(*types.Interface)
compatibility.go#L13: case *types.Interface:
compatibility.go#L14: if new, ok := new.(*types.Interface); ok {
compatibility.go#L113: func (d *differ) checkCompatibleInterface(otn *types.TypeName, old, new *types.Interface) {
compatibility.go#L129: func unexportedMethod(t *types.Interface) *types.Func {
compatibility.go#L275: if _, ok := old.Underlying().(*types.Interface); ok {
correspondence.go#L99: case *types.Interface:
correspondence.go#L100: if new, ok := new.(*types.Interface); ok {
correspondence.go#L290: func (d *differ) sortedMethods(iface *types.Interface) []*types.Func {
correspondence.go#L313: x, y *types.Interface
golang.org/x/tools/go/types/objectpath
objectpath.go#L496: case *types.Interface:
objectpath.go#L917: case *types.Interface:
golang.org/x/tools/go/types/typeutil
map.go#L273: case *types.Interface:
map.go#L443: case *types.Interface:
golang.org/x/tools/internal/gcimporter
iexport.go#L724: if iface, _ := types.Unalias(constraint).(*types.Interface); iface != nil {
iexport.go#L1089: case *types.Interface:
iimport.go#L321: if iface, _ := typ.Underlying().(*types.Interface); iface != nil {
iimport.go#L354: interfaceList []*types.Interface
iimport.go#L507: iface, _ := types.Unalias(rhs).(*types.Interface)
iimport.go#L632: iface, _ := types.Unalias(constraint).(*types.Interface)
iimport.go#L841: _, ok := types.Unalias(t).(*types.Interface)
ureader.go#L48: ifaces []*types.Interface
ureader.go#L417: func (r *reader) interfaceType() *types.Interface {
ureader.go#L585: if iface, ok := types.Unalias(underlying).(*types.Interface); ok && iface.NumExplicitMethods() != 0 {
golang.org/x/tools/internal/typeparams
coretype.go#L19: if _, ok := U.(*types.Interface); !ok {
coretype.go#L125: case *types.Interface:
free.go#L87: case *types.Interface:
normalize.go#L68: iface, _ := constraint.Underlying().(*types.Interface)
normalize.go#L81: func InterfaceTermSet(iface *types.Interface) ([]*types.Term, error) {
normalize.go#L159: case *types.Interface:
normalize.go#L179: case *types.Interface:
golang.org/x/tools/internal/typesinternal
element.go#L76: case *types.Interface:
zerovalue.go#L57: case *types.Interface:
zerovalue.go#L150: case *types.Interface:
zerovalue.go#L333: case *types.Interface: