Skip to content

Commit

Permalink
spec: every type has a method set (minor clarification)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
griesemer committed Feb 20, 2021
1 parent 26713b5 commit 078f08f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/go_spec.html
Original file line number Diff line number Diff line change
@@ -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"
}-->

Expand Down Expand Up @@ -830,7 +830,7 @@ <h2 id="Types">Types</h2>

<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>.
Expand Down

0 comments on commit 078f08f

Please sign in to comment.