1
0
mirror of https://github.com/golang/go synced 2024-09-30 16:08:36 -06:00
The Go programming language
Go to file
Alan Donovan c6ec5ea66d cmd/gorename: support renaming of methods with consequences for other types, iff initiated at an abstract method.
Previously, gorename rejected all method renamings if it would
change the assignability relation.

Now, so long as the renaming was initiated at an abstract
method, the renaming proceeds, changing concrete methods (and
possibly other abstract methods) as needed.  The user
intention is clear.

The intention of a renaming initiated at a concrete method is
less clear, so we still reject it if it would change the
assignability relation.  The diagnostic advises the user to
rename the abstract method if that was the intention.

Additional safety checks are required: for each
satisfy.Constraint that couples a concrete type C and an
interface type I, we must treat it just like a set of implicit
selections C.f, one per abstract method f of I, and ensure the
selections' meanings are unchanged.

The satisfy package no longer canonicalizes types, since this
substitutes one interface for another (equivalent) one, which
is sound, but makes the type names random and the error
messages confusing.

Also, fixed a bug in 'satisfy' relating to map keys.

+ Lots more tests.

LGTM=sameer
R=sameer
CC=golang-codereviews
https://golang.org/cl/173430043
2014-12-04 09:37:50 -05:00
astutil go.tools: use golang.org/x/... import paths 2014-11-10 08:50:40 +11:00
blog go.tools: use golang.org/x/... import paths 2014-11-10 08:50:40 +11:00
cmd cmd/gorename: support renaming of methods with consequences for other types, iff initiated at an abstract method. 2014-12-04 09:37:50 -05:00
container/intsets tools: minor comment fixes. 2014-11-13 12:34:25 -05:00
cover go.tools/cover: split parsing code out from cmd/cover 2013-12-03 20:55:21 -08:00
dashboard x/tools/dashboard/watcher: convert to git 2014-12-04 10:47:26 +11:00
go x/tools/go/vcs: support go.googlecode.com paths 2014-12-04 10:43:23 +11:00
godoc x/tools/godoc/redirect: handle Rietveld and Gerrit CLs at /cl/ 2014-11-24 13:25:05 +11:00
imports go.tools/imports: use same logic as 'go' tool for pruning package search. 2014-11-12 12:45:17 -08:00
oracle cmd/oracle: minor fixes. 2014-11-17 13:50:23 -05:00
playground go.tools: use golang.org/x/... import paths 2014-11-10 08:50:40 +11:00
present go.tools/present: add support for figure captions 2014-07-15 08:23:16 -07:00
refactor cmd/gorename: support renaming of methods with consequences for other types, iff initiated at an abstract method. 2014-12-04 09:37:50 -05:00
.hgignore dashboard: add Cloud Storage upload support to create.go 2014-09-03 21:41:16 -07:00
AUTHORS go.empty: prototype for new subrepository 2012-01-25 14:45:13 -05:00
codereview.cfg codereview: switch defaultcc to golang-codereviews 2013-12-20 10:54:33 -05:00
CONTRIBUTORS go.empty: prototype for new subrepository 2012-01-25 14:45:13 -05:00
LICENSE LICENSE: add 2012-03-17 15:20:58 +11:00
PATENTS go.empty: add PATENTS file to the subrepo. 2012-04-16 11:24:04 +10:00
README go.tools/README: minor correction. 2013-10-29 13:20:58 -04:00

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.