mirror of
https://github.com/golang/go
synced 2024-11-26 13:08:08 -07:00
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>
This commit is contained in:
parent
26713b5fef
commit
078f08f0ee
@ -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>.
|
||||
|
Loading…
Reference in New Issue
Block a user