diff options
author | Robert Griesemer <gri@golang.org> | 2021-02-16 21:05:08 -0800 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2021-02-20 00:01:22 +0000 |
commit | 078f08f0ee1eb6cb172fc1f9d53f34c5783e522d (patch) | |
tree | b9eb0a3a6c74ac97789dd60cd515eb101548c56a /doc/go_spec.html | |
parent | 26713b5fefc158feb1f0f3d5d30627de226f7668 (diff) | |
download | go-078f08f0ee1eb6cb172fc1f9d53f34c5783e522d.tar.gz go-078f08f0ee1eb6cb172fc1f9d53f34c5783e522d.zip |
spec: every type has a method set (minor clarification)
The spec states that a type "may" have a method set associated with it.
Yet every type has a method set, which may be empty. This is clarified
later in the same paragraph. Be clear in the first sentence as well.
Per the suggestion from https://github.com/DQNEO.
Fixes #44318.
Change-Id: I6097b1c7062853e404b7fead56d18a7f9c576fc3
Reviewed-on: https://go-review.googlesource.com/c/go/+/292853
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'doc/go_spec.html')
-rw-r--r-- | doc/go_spec.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/go_spec.html b/doc/go_spec.html index 59c9ce3c43..e22fabd699 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -1,6 +1,6 @@ <!--{ "Title": "The Go Programming Language Specification", - "Subtitle": "Version of Feb 10, 2021", + "Subtitle": "Version of Feb 19, 2021", "Path": "/ref/spec" }--> @@ -830,7 +830,7 @@ The underlying type of <code>[]B1</code>, <code>B3</code>, and <code>B4</code> i <h3 id="Method_sets">Method sets</h3> <p> -A type may have a <i>method set</i> associated with it. +A type has a (possibly empty) <i>method set</i> associated with it. The method set of an <a href="#Interface_types">interface type</a> is its interface. The method set of any other type <code>T</code> consists of all <a href="#Method_declarations">methods</a> declared with receiver type <code>T</code>. |