aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2022-09-27 09:10:21 -0700
committerGopher Robot <gobot@golang.org>2022-09-27 16:24:53 +0000
commitb0f8e20d041cdb739db558c00edf14eb7e01c3da (patch)
treeb5b3272ea83c3e0480bbabe6b34b7d3178bd70b7 /src
parentc929a5b855e5d1680a70c5e1ab11a4933655d66c (diff)
downloadgo-b0f8e20d041cdb739db558c00edf14eb7e01c3da.tar.xz
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>
Diffstat (limited to 'src')
-rw-r--r--src/reflect/value.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/reflect/value.go b/src/reflect/value.go
index ae6c4daf58..89cc37f1db 100644
--- a/src/reflect/value.go
+++ b/src/reflect/value.go
@@ -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 {