aboutsummaryrefslogtreecommitdiff
path: root/src/go/types/unify.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/go/types/unify.go')
-rw-r--r--src/go/types/unify.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/go/types/unify.go b/src/go/types/unify.go
index ab18febbdf..fbcd64c442 100644
--- a/src/go/types/unify.go
+++ b/src/go/types/unify.go
@@ -83,7 +83,7 @@ func (d *tparamsList) init(tparams []*TypeName) {
}
if debug {
for i, tpar := range tparams {
- assert(i == tpar.typ.(*TypeParam).index)
+ assert(i == tpar.typ.(*_TypeParam).index)
}
}
d.tparams = tparams
@@ -131,7 +131,7 @@ func (u *unifier) join(i, j int) bool {
// If typ is a type parameter of d, index returns the type parameter index.
// Otherwise, the result is < 0.
func (d *tparamsList) index(typ Type) int {
- if t, ok := typ.(*TypeParam); ok {
+ if t, ok := typ.(*_TypeParam); ok {
if i := t.index; i < len(d.tparams) && d.tparams[i].typ == t {
return i
}
@@ -335,7 +335,7 @@ func (u *unifier) nify(x, y Type, p *ifacePair) bool {
u.nify(x.results, y.results, p)
}
- case *Sum:
+ case *_Sum:
// This should not happen with the current internal use of sum types.
panic("type inference across sum types not implemented")
@@ -431,7 +431,7 @@ func (u *unifier) nify(x, y Type, p *ifacePair) bool {
}
}
- case *TypeParam:
+ case *_TypeParam:
// Two type parameters (which are not part of the type parameters of the
// enclosing type as those are handled in the beginning of this function)
// are identical if they originate in the same declaration.