1
0
mirror of https://github.com/golang/go synced 2024-11-18 20:14:43 -07:00

go/internal/gccgoimporter: update package to match std lib version

Import changes from std lib version, specifically

      https://golang.org/cl/173440

which rolls out a more robust fix for issue 31540.

Updates golang/go#31540.

Change-Id: Ibeeb00ffd0ee6456d50fd4a243a1162f3940ad68
Reviewed-on: https://go-review.googlesource.com/c/tools/+/173777
Run-TryBot: Than McIntosh <thanm@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Than McIntosh 2019-04-24 15:47:23 -04:00
parent 1e8e1cfdf9
commit 9e44c1c403

View File

@ -497,6 +497,7 @@ func (p *parser) parseNamedType(nlist []int) types.Type {
// type alias
if p.tok == '=' {
p.next()
p.aliases[nlist[len(nlist)-1]] = name
if obj != nil {
// use the previously imported (canonical) type
t := obj.Type()
@ -506,7 +507,6 @@ func (p *parser) parseNamedType(nlist []int) types.Type {
}
t := p.parseType(pkg, nlist...)
obj = types.NewTypeName(token.NoPos, pkg, name, t)
p.aliases[nlist[len(nlist)-1]] = name
scope.Insert(obj)
return t
}