]> Cypherpunks repositories - gostls13.git/commit
go/importer: handle multiple imports of the same object
authorRobert Griesemer <gri@golang.org>
Tue, 1 Nov 2016 21:46:59 +0000 (14:46 -0700)
committerRobert Griesemer <gri@golang.org>
Tue, 1 Nov 2016 22:32:45 +0000 (22:32 +0000)
commitc3e0dc23fbca3ad168502f688e7c3f1882f62b73
tree566696f76e2359cfd0d74537aa12918aca92ee97
parent012fec3821d6d01b69a563125fcb7ae49186be81
go/importer: handle multiple imports of the same object

Before aliases, and because we chose a simple export format for them,
a package may now export the same object more than once if there are
multiple exported aliases referring to that object. The go/importer
made the assumption this couldn't happen. Adjust it.

Fixes #17726.

Change-Id: Ibb9fc669a8748200b45ad78934d7453e5a5aad82
Reviewed-on: https://go-review.googlesource.com/32538
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Robert Griesemer <gri@golang.org>
src/go/internal/gcimporter/bimport.go
src/go/types/api_test.go
src/go/types/testdata/alias.go