From 6317adeed7815ad335e2e97c463a7c3c4d82fc19 Mon Sep 17 00:00:00 2001 From: Tim Cooper Date: Mon, 1 Jan 2018 12:11:58 -0400 Subject: [PATCH] reflect: explicitly state that Type values can be used as map keys Fixes #6535 Change-Id: I34974c0050424c96d19ad69bf4522bb69cde2fd5 Reviewed-on: https://go-review.googlesource.com/85815 Reviewed-by: Ian Lance Taylor --- src/reflect/type.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/reflect/type.go b/src/reflect/type.go index dce40582bb..9c967de45c 100644 --- a/src/reflect/type.go +++ b/src/reflect/type.go @@ -32,7 +32,8 @@ import ( // calling kind-specific methods. Calling a method // inappropriate to the kind of type causes a run-time panic. // -// Type values are comparable, such as with the == operator. +// Type values are comparable, such as with the == operator, and Type can be +// used as a map key type. // Two Type values are equal if they represent identical types. type Type interface { // Methods applicable to all types. -- 2.50.0