mirror of
https://github.com/golang/go
synced 2024-09-18 15:32:18 +00:00
reflect: clarify that Value.Comparable checks the value
For #46746 Change-Id: Ic7a31ddf7cd6bf6dd0db6b9eb3fee68fc180f72e Reviewed-on: https://go-review.googlesource.com/c/go/+/435277 Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
parent
c929a5b855
commit
b0f8e20d04
|
@ -3261,7 +3261,7 @@ func (v Value) CanConvert(t Type) bool {
|
|||
return true
|
||||
}
|
||||
|
||||
// Comparable reports whether the type of v is comparable.
|
||||
// Comparable reports whether the value v is comparable.
|
||||
// If the type of v is an interface, this checks the dynamic type.
|
||||
// If this reports true then v.Interface() == x will not panic for any x.
|
||||
func (v Value) Comparable() bool {
|
||||
|
|
Loading…
Reference in a new issue