diff options
author | Robert Griesemer <gri@golang.org> | 2021-08-05 18:33:22 -0700 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2021-08-06 20:34:54 +0000 |
commit | 9e0ac72d680e71d22c7d31950a16d4f92f08305a (patch) | |
tree | 2040951af4a4f9403d492214af203ab879be8584 /src/cmd/compile/internal/types2/interface.go | |
parent | 9bd1817e417e9f07c6b3aba0189576bbf06f1592 (diff) | |
download | go-9e0ac72d680e71d22c7d31950a16d4f92f08305a.tar.gz go-9e0ac72d680e71d22c7d31950a16d4f92f08305a.zip |
[dev.typeparams] cmd/compile/internal/types2: remove Interface.Complete (cleanup)
Interface.Complete is not needed anymore. We can remove it in
types2 (and eventually make it an empty function in go/types,
where we must maintain the existing API).
Change-Id: I689f0d6f3a83997d8ca5bae773b9af0083d0bf4f
Reviewed-on: https://go-review.googlesource.com/c/go/+/340255
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Diffstat (limited to 'src/cmd/compile/internal/types2/interface.go')
-rw-r--r-- | src/cmd/compile/internal/types2/interface.go | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/cmd/compile/internal/types2/interface.go b/src/cmd/compile/internal/types2/interface.go index 89cf846598..2617f748de 100644 --- a/src/cmd/compile/internal/types2/interface.go +++ b/src/cmd/compile/internal/types2/interface.go @@ -100,25 +100,6 @@ func (t *Interface) IsComparable() bool { return t.typeSet().IsComparable() } // IsConstraint reports whether interface t is not just a method set. func (t *Interface) IsConstraint() bool { return !t.typeSet().IsMethodSet() } -// Complete computes the interface's type set. It must be called by users of -// NewInterfaceType and NewInterface after the interface's embedded types are -// fully defined and before using the interface type in any way other than to -// form other types. The interface must not contain duplicate methods or a -// panic occurs. Complete returns the receiver. -// -// Deprecated: Type sets are now computed lazily, on demand; this function -// is only here for backward-compatibility. It does not have to -// be called explicitly anymore. -func (t *Interface) Complete() *Interface { - // Some tests are still depending on the state change - // (string representation of an Interface not containing an - // /* incomplete */ marker) caused by the explicit Complete - // call, so we compute the type set eagerly here. - t.complete = true - t.typeSet() - return t -} - func (t *Interface) Underlying() Type { return t } func (t *Interface) String() string { return TypeString(t, nil) } |