mirror of https://github.com/golang/go.git
go/types, types2: add an assertion that named type origin is idempotent
For #46794 Change-Id: I19edc19640a2dfa6bc7504dd8e1742a261ba29f1 Reviewed-on: https://go-review.googlesource.com/c/go/+/393368 Trust: Robert Findley <rfindley@google.com> Run-TryBot: Robert Findley <rfindley@google.com> Reviewed-by: Robert Griesemer <gri@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
parent
adae6ec542
commit
4a46e6e44c
|
|
@ -78,6 +78,7 @@ func (check *Checker) newNamed(obj *TypeName, orig *Named, underlying Type, tpar
|
|||
}
|
||||
|
||||
func (t *Named) cleanup() {
|
||||
assert(t.orig.orig == t.orig)
|
||||
// Ensure that every defined type created in the course of type-checking has
|
||||
// either non-*Named underlying, or is unresolved.
|
||||
//
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@ func (check *Checker) newNamed(obj *TypeName, orig *Named, underlying Type, tpar
|
|||
}
|
||||
|
||||
func (t *Named) cleanup() {
|
||||
assert(t.orig.orig == t.orig)
|
||||
// Ensure that every defined type created in the course of type-checking has
|
||||
// either non-*Named underlying, or is unresolved.
|
||||
//
|
||||
|
|
|
|||
Loading…
Reference in New Issue