diff options
Diffstat (limited to 'src/cmd/compile/internal/typecheck/iimport.go')
-rw-r--r-- | src/cmd/compile/internal/typecheck/iimport.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/typecheck/iimport.go b/src/cmd/compile/internal/typecheck/iimport.go index 7b7cd7f148..4a97267f05 100644 --- a/src/cmd/compile/internal/typecheck/iimport.go +++ b/src/cmd/compile/internal/typecheck/iimport.go @@ -567,9 +567,11 @@ func (r *importReader) pos() src.XPos { func (r *importReader) typ() *types.Type { // If this is a top-level type call, defer type instantiations until the // type is fully constructed. + types.DeferCheckSize() deferDoInst() t := r.p.typAt(r.uint64()) resumeDoInst() + types.ResumeCheckSize() return t } @@ -1738,7 +1740,11 @@ func InstTypeName(name string, targs []*types.Type) string { b.WriteString(targ.Sym().Pkg.Name) b.WriteByte('.') } - b.WriteString(targ.String()) + // types1 uses "interface {" and types2 uses "interface{" - convert + // to consistent types2 format. + tstring := targ.String() + tstring = strings.Replace(tstring, "interface {", "interface{", -1) + b.WriteString(tstring) } b.WriteByte(']') return b.String() |