Descriptiongo.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 issue 8177.
Patch Set 1 #Patch Set 2 : diff -r 15d5d18b23ba https://code.google.com/p/go.tools #Patch Set 3 : diff -r 15d5d18b23ba https://code.google.com/p/go.tools #
Total comments: 4
Patch Set 4 : diff -r 15d5d18b23ba https://code.google.com/p/go.tools #
Total comments: 20
Patch Set 5 : diff -r 11d41c5f9e17 https://code.google.com/p/go.tools #
Total comments: 2
Patch Set 6 : diff -r 11d41c5f9e17 https://code.google.com/p/go.tools #
MessagesTotal messages: 14
|