aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/types2/interface.go
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2021-07-27 19:13:26 -0700
committerRobert Griesemer <gri@golang.org>2021-07-29 19:45:02 +0000
commitff0c0dbca6a7a3a3d6528481829679be4c9d7e94 (patch)
treef1a8f548ddcfdbb13d0af7811f0efca53709f8f3 /src/cmd/compile/internal/types2/interface.go
parent2fa8f00915893670964e05e14be7202f6f97760b (diff)
downloadgo-ff0c0dbca6a7a3a3d6528481829679be4c9d7e94.tar.gz
go-ff0c0dbca6a7a3a3d6528481829679be4c9d7e94.zip
[dev.typeparams] cmd/compile/internal/types2: use type terms to represent unions
This is just an internal representation change for now. Change-Id: I7e0126e9b17850ec020c2a60db13582761557bea Reviewed-on: https://go-review.googlesource.com/c/go/+/338092 Trust: Robert Griesemer <gri@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.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/compile/internal/types2/interface.go b/src/cmd/compile/internal/types2/interface.go
index cf8ec1a5e2..fc1f5ffe00 100644
--- a/src/cmd/compile/internal/types2/interface.go
+++ b/src/cmd/compile/internal/types2/interface.go
@@ -30,7 +30,7 @@ func (t *Interface) is(f func(Type, bool) bool) bool {
// TODO(gri) should settle on top or nil to represent this case
return false // we must have at least one type! (was bug)
case *Union:
- return t.is(func(typ Type, tilde bool) bool { return f(typ, tilde) })
+ return t.is(func(t *term) bool { return f(t.typ, t.tilde) })
default:
return f(t, false)
}
@@ -260,8 +260,8 @@ func (check *Checker) interfaceType(ityp *Interface, iface *syntax.InterfaceType
sortMethods(ityp.methods)
// Compute type set with a non-nil *Checker as soon as possible
- // to report any errors. Subsequent uses of type sets should be
- // using this computed type set and won't need to pass in a *Checker.
+ // to report any errors. Subsequent uses of type sets will use
+ // this computed type set and won't need to pass in a *Checker.
check.later(func() { computeTypeSet(check, iface.Pos(), ityp) })
}