aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2015-07-21 14:05:13 +1000
committerRob Pike <r@golang.org>2015-07-22 01:25:32 +0000
commit6c7acdfbdbfd5c8a3b60d6b796041257360a19c3 (patch)
tree4d10c409130ed9369bcd6d489fc2140d6009a627
parentfc7f6d307a7e220506ad2798cd0610962208d26e (diff)
downloadgo-6c7acdfbdbfd5c8a3b60d6b796041257360a19c3.tar.xz
doc: add a clause about embedded methods to go1compat
This is a corner case but it is suggested we call it out. Fixes #11798. Change-Id: I2ddb5b363cd2921666dbf03bbf98107697ca40e5 Reviewed-on: https://go-review.googlesource.com/12460 Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-rw-r--r--doc/go1compat.html12
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/go1compat.html b/doc/go1compat.html
index d800dec0c0..607d354687 100644
--- a/doc/go1compat.html
+++ b/doc/go1compat.html
@@ -96,6 +96,18 @@ in a separate package should use the keyed notation.
</li>
<li>
+Methods. As with struct fields, it may be necessary to add methods
+to types.
+Under some circumstances, such as when the type is embedded in
+a struct along with another type,
+the addition of the new method may break
+the struct by creating a conflict with an existing method of the other
+embedded type.
+We cannot protect against this rare case and do not guarantee compatibility
+should it arise.
+</li>
+
+<li>
Dot imports. If a program imports a standard package
using <code>import . "path"</code>, additional names defined in the
imported package in future releases may conflict with other names