- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 15 for SetUnderlying (0.34 sec)
-
src/cmd/compile/internal/types/universe.go
// error type DeferCheckSize() ErrorType = defBasic(TFORW, BuiltinPkg, "error") ErrorType.SetUnderlying(makeErrorInterface()) ResumeCheckSize() // comparable type (interface) DeferCheckSize() ComparableType = defBasic(TFORW, BuiltinPkg, "comparable") ComparableType.SetUnderlying(makeComparableInterface()) ResumeCheckSize() // any type (interface) DeferCheckSize()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jan 26 21:56:49 UTC 2023 - 4K bytes - Viewed (0) -
src/cmd/compile/internal/types2/universe.go
// interface{ Error() string } ityp := &Interface{methods: []*Func{err}, complete: true} computeInterfaceTypeSet(nil, nopos, ityp) // prevent races due to lazy computation of tset typ.SetUnderlying(ityp) def(obj) } // type comparable interface{} // marked as comparable { obj := NewTypeName(nopos, nil, "comparable", nil) obj.setColor(black) typ := NewNamed(obj, nil, nil)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 07 20:08:23 UTC 2024 - 9.1K bytes - Viewed (0) -
src/go/types/universe.go
// interface{ Error() string } ityp := &Interface{methods: []*Func{err}, complete: true} computeInterfaceTypeSet(nil, nopos, ityp) // prevent races due to lazy computation of tset typ.SetUnderlying(ityp) def(obj) } // type comparable interface{} // marked as comparable { obj := NewTypeName(nopos, nil, "comparable", nil) obj.setColor(black) typ := NewNamed(obj, nil, nil)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 07 20:08:23 UTC 2024 - 9.3K bytes - Viewed (0) -
src/go/internal/gcimporter/ureader.go
// We need to call iface.Complete(), but if there are any embedded // defined types, then we may not have set their underlying // interface type yet. So we need to defer calling Complete until // after we've called SetUnderlying everywhere. // // TODO(mdempsky): After CL 424876 lands, it should be safe to call // iface.Complete() immediately. r.p.ifaces = append(r.p.ifaces, iface) return iface }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 16.6K bytes - Viewed (0) -
src/cmd/compile/internal/types2/named.go
rtyp = NewPointer(t) } else { rtyp = t } sig.recv = substVar(origSig.recv, rtyp) return substFunc(origm, sig) } // SetUnderlying sets the underlying type and marks t as complete. // t must not have type arguments. func (t *Named) SetUnderlying(underlying Type) { assert(t.inst == nil) if underlying == nil { panic("underlying type must not be nil") } if asNamed(underlying) != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 20:03:31 UTC 2024 - 23.9K bytes - Viewed (0) -
src/go/types/named.go
rtyp = NewPointer(t) } else { rtyp = t } sig.recv = substVar(origSig.recv, rtyp) return substFunc(origm, sig) } // SetUnderlying sets the underlying type and marks t as complete. // t must not have type arguments. func (t *Named) SetUnderlying(underlying Type) { assert(t.inst == nil) if underlying == nil { panic("underlying type must not be nil") } if asNamed(underlying) != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 20:03:31 UTC 2024 - 24K bytes - Viewed (0) -
src/cmd/compile/internal/types/type.go
func (t *Type) Obj() Object { return t.obj } // SetUnderlying sets the underlying type of an incomplete type (i.e. type whose kind // is currently TFORW). SetUnderlying automatically updates any types that were waiting // for this type to be completed. func (t *Type) SetUnderlying(underlying *Type) { if underlying.kind == TFORW { // This type isn't computed yet; when it is, update n.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 04 14:29:45 UTC 2024 - 49.5K bytes - Viewed (0) -
src/cmd/compile/internal/walk/select.go
func scasetype() *types.Type { if scase == nil { n := ir.NewDeclNameAt(src.NoXPos, ir.OTYPE, ir.Pkgs.Runtime.Lookup("scase")) scase = types.NewNamed(n) n.SetType(scase) n.SetTypecheck(1) scase.SetUnderlying(types.NewStruct([]*types.Field{ types.NewField(base.Pos, typecheck.Lookup("c"), types.Types[types.TUNSAFEPTR]), types.NewField(base.Pos, typecheck.Lookup("elem"), types.Types[types.TUNSAFEPTR]), })) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 22 01:53:41 UTC 2023 - 7.8K bytes - Viewed (0) -
src/go/types/issues_test.go
T2 := NewNamed(n2, nil, nil) s1 := NewStruct([]*Var{NewField(nopos, nil, "_", T2, false)}, nil) T1.SetUnderlying(s1) s2 := NewStruct([]*Var{NewField(nopos, nil, "_", T2, false)}, nil) s3 := NewStruct([]*Var{NewField(nopos, nil, "_", s2, false)}, nil) T2.SetUnderlying(s3) // These calls must terminate (no endless recursion). Comparable(T1) Comparable(T2) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 28.1K bytes - Viewed (0) -
src/cmd/compile/internal/types2/issues_test.go
T2 := NewNamed(n2, nil, nil) s1 := NewStruct([]*Var{NewField(nopos, nil, "_", T2, false)}, nil) T1.SetUnderlying(s1) s2 := NewStruct([]*Var{NewField(nopos, nil, "_", T2, false)}, nil) s3 := NewStruct([]*Var{NewField(nopos, nil, "_", s2, false)}, nil) T2.SetUnderlying(s3) // These calls must terminate (no endless recursion). Comparable(T1) Comparable(T2) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 28.1K bytes - Viewed (0)