From: Ian Lance Taylor Date: Tue, 27 Sep 2022 16:10:21 +0000 (-0700) Subject: reflect: clarify that Value.Comparable checks the value X-Git-Tag: go1.20rc1~911 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=b0f8e20d041cdb739db558c00edf14eb7e01c3da;p=gostls13.git 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 Reviewed-by: Bryan Mills Run-TryBot: Ian Lance Taylor Auto-Submit: Ian Lance Taylor Run-TryBot: Ian Lance Taylor TryBot-Result: Gopher Robot --- 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 {