1
0
mirror of https://github.com/golang/go synced 2024-11-18 22:04:43 -07:00
go/go/gccgoimporter
Peter Collingbourne 4329a10ae7 go.tools/go: separate interface construction from method set construction
We introduce a method (*Interface).Complete(), which is intended
to be called from clients after all embedded interfaces have been
fully defined. For importers, this will definitely be the case
after the import has finished, so each importer have been updated
to do so, with the exception of the gcimporter, which does not use
embedded interfaces, therefore Complete() can be called immediately
after construction.

Building the method set separately from the constructor type caused
some problems with go/importer, which copies the types.Interface
object, leading to there existing two almost-identical interface
types referenced from interface method receivers, only one of which
has been completed. To avoid this situation, the importer has been
modified to construct the interface object only once.

Fixes golang/go#8177.

LGTM=gri
R=gri, dave, gordon.klaus, adonovan
CC=golang-codereviews
https://golang.org/cl/105060044
2014-07-09 20:00:49 -07:00
..
testdata go.tools/go/gccgoimporter: keep track of package and import priority 2014-06-17 10:56:47 -07:00
gccgoinstallation_test.go go.tools/go/gccgoimporter: keep track of package and import priority 2014-06-17 10:56:47 -07:00
gccgoinstallation.go go.tools/go/gccgoimporter: keep track of package and import priority 2014-06-17 10:56:47 -07:00
importer_test.go go.tools/go/gccgoimporter: keep track of package and import priority 2014-06-17 10:56:47 -07:00
importer.go go.tools/go/gccgoimporter: keep track of package and import priority 2014-06-17 10:56:47 -07:00
parser_test.go go.tools/go/gccgoimporter: importer for gccgo export data 2014-01-08 09:00:50 -08:00
parser.go go.tools/go: separate interface construction from method set construction 2014-07-09 20:00:49 -07:00