aboutsummaryrefslogtreecommitdiff
path: root/src/go/types/instantiate.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/go/types/instantiate.go')
-rw-r--r--src/go/types/instantiate.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/go/types/instantiate.go b/src/go/types/instantiate.go
index b74f0db466..b178d1eb3f 100644
--- a/src/go/types/instantiate.go
+++ b/src/go/types/instantiate.go
@@ -118,8 +118,9 @@ func (check *Checker) instance(pos token.Pos, typ Type, targs []Type, env *Envir
tname := NewTypeName(pos, t.obj.pkg, t.obj.name, nil)
named := check.newNamed(tname, t, nil, nil, nil) // methods and tparams are set when named is resolved
named.targs = NewTypeList(targs)
- named.instPos = &pos
- named.resolver = expandNamed
+ named.resolver = func(env *Environment, n *Named) (*TypeParamList, Type, []*Func) {
+ return expandNamed(env, n, pos)
+ }
if env != nil {
// It's possible that we've lost a race to add named to the environment.
// In this case, use whichever instance is recorded in the environment.