go/types.Type.Underlying (method)
120 uses
go/types (current package)
alias.go#L74: func (a *Alias) Underlying() Type { return unalias(a).Underlying() }
api_predicates.go#L22: if !isValid(T.Underlying()) {
api_predicates.go#L60: if !isValid(V.Underlying()) {
assignments.go#L97: if sig, _ := x.typ.Underlying().(*Signature); sig != nil && sig.TypeParams().Len() > 0 {
assignments.go#L267: if _, ok := T.Underlying().(*Signature); ok {
builtins.go#L154: switch t := arrayPtrDeref(x.typ.Underlying()).(type) {
builtins.go#L213: if isValid(x.typ.Underlying()) {
builtins.go#L332: if t, _ := typ.Underlying().(*Basic); t != nil {
builtins.go#L482: if t, _ := typ.Underlying().(*Basic); t != nil {
builtins.go#L1030: switch u := t.Underlying().(type) {
builtins.go#L1122: if a, _ := p.base.Underlying().(*Array); a != nil {
call.go#L214: if t, _ := T.Underlying().(*Interface); t != nil && !isTypeParam(T) {
call.go#L812: if !isValid(x.typ.Underlying()) {
const.go#L38: check.representable(x, x.typ.Underlying().(*Basic))
conversions.go#L24: switch t, _ := T.Underlying().(*Basic); {
conversions.go#L148: Vu := V.Underlying()
conversions.go#L149: Tu := T.Underlying()
conversions.go#L164: if IdenticalIgnoreTags(V.base.Underlying(), T.base.Underlying()) && !isTypeParam(V.base) && !isTypeParam(T.base) {
conversions.go#L217: if a, _ := a.Elem().Underlying().(*Array); a != nil {
conversions.go#L298: t, _ := typ.Underlying().(*Basic)
conversions.go#L303: t, _ := typ.Underlying().(*Basic)
conversions.go#L308: _, ok := typ.Underlying().(*Pointer)
conversions.go#L313: if s, _ := typ.Underlying().(*Slice); s != nil {
conversions.go#L314: t, _ := s.elem.Underlying().(*Basic)
decl.go#L428: if isValid(t.Underlying()) {
expr.go#L339: old.typ = typ.Underlying().(*Basic)
expr.go#L401: switch u := target.Underlying().(type) {
expr.go#L608: switch typ.Underlying().(type) {
expr.go#L958: if sig, _ := typ.Underlying().(*Signature); sig != nil {
expr.go#L1124: if _, ok := x.typ.Underlying().(*Interface); !ok {
gcsizes.go#L22: switch t := T.Underlying().(type) {
gcsizes.go#L102: switch t := T.Underlying().(type) {
index.go#L39: if sig, _ := x.typ.Underlying().(*Signature); sig != nil && sig.TypeParams().Len() > 0 {
index.go#L54: switch typ := x.typ.Underlying().(type) {
index.go#L77: if typ, _ := typ.base.Underlying().(*Array); typ != nil {
index.go#L128: if t, _ := t.base.Underlying().(*Array); t != nil {
index.go#L255: cu = x.typ.Underlying() // untyped string remains untyped
index.go#L300: if u, _ := u.base.Underlying().(*Array); u != nil {
infer.go#L674: assert(single.typ.Underlying() == u)
instantiate.go#L232: Vu := V.Underlying()
instantiate.go#L233: Tu := T.Underlying()
instantiate.go#L237: if p, _ := Vu.(*Pointer); p != nil && !isValid(p.base.Underlying()) {
instantiate.go#L345: if alt == nil && !t.tilde && Identical(t.typ, t.typ.Underlying()) {
lookup.go#L158: if _, ok := typ.Underlying().(*Interface); ok {
lookup.go#L208: switch t := typ.Underlying().(type) {
lookup.go#L379: methods := T.Underlying().(*Interface).typeSet().methods // T must be an interface
lookup.go#L399: if u, _ := V.Underlying().(*Interface); u != nil {
lookup.go#L540: if S, _ := derefStructPtr(T).Underlying().(*Struct); S != nil && !seen[S] {
lookup.go#L555: p, _ := T.Underlying().(*Pointer)
lookup.go#L562: if p, _ := T.Underlying().(*Pointer); isTypeParam(p.base) {
lookup.go#L635: if p, _ := typ.Underlying().(*Pointer); p != nil {
lookup.go#L636: if _, ok := p.base.Underlying().(*Struct); ok {
methodset.go#L136: switch t := typ.Underlying().(type) {
named.go#L822: return typ.Underlying()
object.go#L605: typ = typ.Underlying()
operand.go#L201: what = x.typ.Underlying().(*Basic).name
operand.go#L236: switch typ.Underlying().(type) {
operand.go#L326: Vu := V.Underlying()
operand.go#L327: Tu := T.Underlying()
predicates.go#L38: u, _ := t.Underlying().(*Basic)
predicates.go#L113: _, ok := t.Underlying().(*Interface)
predicates.go#L169: switch t := T.Underlying().(type) {
predicates.go#L212: switch u := t.Underlying().(type) {
range.go#L41: if t, ok := arrayPtrDeref(x.typ.Underlying()).(*Array); ok {
signature.go#L96: s, _ = t.Underlying().(*Slice)
sizes.go#L60: switch t := T.Underlying().(type) {
sizes.go#L168: switch t := T.Underlying().(type) {
sizes.go#L313: s := T.Underlying().(*Struct)
struct.go#L148: switch u := t.Underlying().(type) {
type.go#L14: Underlying() Type
typeparam.go#L119: switch u := bound.Underlying().(type) {
typeset.go#L123: u = u.Underlying()
typeset.go#L126: assert(Identical(u, u.Underlying()))
typeset.go#L270: switch u := typ.Underlying().(type) {
typeset.go#L386: u := t.typ.Underlying()
typestring.go#L217: if t == universeAnyAlias.Type().Underlying() {
typeterm.go#L121: u = u.Underlying()
typeterm.go#L161: ux = ux.Underlying()
typeterm.go#L165: uy = uy.Underlying()
typexpr.go#L175: if t, _ := typ.Underlying().(*Interface); t != nil {
under.go#L26: return f(t, t.Underlying())
unify.go#L276: i, _ = x.Underlying().(*Interface)
unify.go#L436: if yc, _ := y.Underlying().(*Chan); yc != nil && yc.dir != SendRecv {
union.go#L97: u := t.typ.Underlying()
universe.go#L112: _ = NewAlias(universeAnyAlias, universeAnyNoAlias.Type().Underlying()) // Link TypeName and Alias
go.pact.im/x/plumb/internal/discover
discover.go#L628: under := types.Unalias(tn.Type()).Underlying()
discover.go#L725: if iface, ok := owner.Underlying().(*types.Interface); ok && !iface.IsMethodSet() {
go.pact.im/x/plumb/internal/gotypes
gotypes.go#L152: iface, ok := c.Underlying().(*types.Interface)
go.pact.im/x/plumb/internal/solve
instance.go#L165: if iface, ok := owner.Underlying().(*types.Interface); ok {
instance.go#L194: st, ok := recv.Underlying().(*types.Struct)
instance.go#L220: st, ok := declared.Underlying().(*types.Struct)
golang.org/x/exp/apidiff
apidiff.go#L210: oIface, ok := otn1.Type().Underlying().(*types.Interface)
apidiff.go#L214: nIface, ok := nt1.Underlying().(*types.Interface)
compatibility.go#L202: t := f.Type().Underlying()
compatibility.go#L204: t = p.Elem().Underlying()
compatibility.go#L263: d.checkCompatible(otn, old.Underlying(), new.Underlying())
compatibility.go#L266: if reflect.TypeOf(old.Underlying()) != reflect.TypeOf(new.Underlying()) {
golang.org/x/tools/internal/gcimporter
iexport.go#L1315: switch b := typ.Underlying().(*types.Basic); b.Info() & types.IsConstType {
iexport.go#L1341: panic(internalErrorf("unexpected type %v (%v)", typ, typ.Underlying()))
iexport.go#L1402: basic, ok := typ.Underlying().(*types.Basic)
iexport.go#L1404: panic(internalErrorf("unexpected type %v (%T)", typ.Underlying(), typ.Underlying()))
iimport.go#L356: if iface, _ := typ.Underlying().(*types.Interface); iface != nil {
iimport.go#L611: underlying := r.p.typAt(r.uint64(), named).Underlying()
iimport.go#L697: switch b := typ.Underlying().(*types.Basic); b.Info() & types.IsConstType {
ureader.go#L616: if underlying := rhs.Underlying(); underlying != nil {
ureader.go#L628: setUnderlying(rhs.Underlying())
golang.org/x/tools/internal/typeparams
coretype.go#L18: U := T.Underlying()
coretype.go#L30: U = terms[0].Type().Underlying()
coretype.go#L33: if !types.Identical(U, terms[identical].Type().Underlying()) {
coretype.go#L51: curr, ok := terms[chans].Type().Underlying().(*types.Chan)
normalize.go#L68: iface, _ := constraint.Underlying().(*types.Interface)
normalize.go#L70: return nil, fmt.Errorf("constraint is %T, not *types.Interface", constraint.Underlying())
normalize.go#L158: switch u := t.Underlying().(type) {
normalize.go#L164: if _, ok := embedded.Underlying().(*types.TypeParam); ok {
normalize.go#L178: switch t.Type().Underlying().(type) {
normalize.go#L215: return t.Underlying()
golang.org/x/tools/internal/typesinternal
types.go#L257: ptr, isPtr := t.Underlying().(*types.Pointer)
types.go#L261: structType, ok := t.Underlying().(*types.Struct)