aboutsummaryrefslogtreecommitdiff
path: root/src/builtin
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2022-02-08 13:11:09 -0800
committerIan Lance Taylor <iant@golang.org>2022-02-08 21:59:36 +0000
commitf524a2baa4aca9e603fbf3891951b53b497dc0a1 (patch)
tree7cd9e57e09d2f5d91ef5a73ae336ebd8e927062d /src/builtin
parent275aedccd4f2beae82dbf96c94a6c1c9b365a647 (diff)
downloadgo-f524a2baa4aca9e603fbf3891951b53b497dc0a1.tar.gz
go-f524a2baa4aca9e603fbf3891951b53b497dc0a1.zip
builtin: clarify that interface types do not implement comparable
Fixes #51083 Change-Id: Ic9207ae4104b06749925186e0eb4f18edf1b5007 Reviewed-on: https://go-review.googlesource.com/c/go/+/384235 Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
Diffstat (limited to 'src/builtin')
-rw-r--r--src/builtin/builtin.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/builtin/builtin.go b/src/builtin/builtin.go
index 08ae7ed313..5657be4564 100644
--- a/src/builtin/builtin.go
+++ b/src/builtin/builtin.go
@@ -95,11 +95,11 @@ type rune = int32
type any = interface{}
// comparable is an interface that is implemented by all comparable types
-// (booleans, numbers, strings, pointers, channels, interfaces,
-// arrays of comparable types, structs whose fields are all comparable types).
+// (booleans, numbers, strings, pointers, channels, arrays of comparable types,
+// structs whose fields are all comparable types).
// The comparable interface may only be used as a type parameter constraint,
// not as the type of a variable.
-type comparable comparable
+type comparable interface{ comparable }
// iota is a predeclared identifier representing the untyped integer ordinal
// number of the current const specification in a (usually parenthesized)