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 |
||
|---|---|---|
| astutil | ||
| blog | ||
| cmd | ||
| container/intsets | ||
| cover | ||
| dashboard | ||
| go | ||
| godoc | ||
| imports | ||
| oracle | ||
| playground | ||
| present | ||
| refactor | ||
| .hgignore | ||
| AUTHORS | ||
| CONTRIBUTORS | ||
| LICENSE | ||
| PATENTS | ||
| README | ||
| codereview.cfg | ||
README
This subrepository holds the source for various packages and tools that support the Go programming language. Some of the tools, godoc and vet for example, are included in binary Go distributions. Others, including the Go oracle and the test coverage tool, can be fetched with "go get". Packages include a type-checker for Go and an implementation of the Static Single Assignment form (SSA) representation for Go programs. To submit changes to this repository, see http://golang.org/doc/contribute.html.