Skip to content

Commit 6317ade

Browse files
Tim Cooperianlancetaylor
Tim Cooper
authored andcommitted
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 <[email protected]>
1 parent cd97aca commit 6317ade

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/reflect/type.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ import (
3232
// calling kind-specific methods. Calling a method
3333
// inappropriate to the kind of type causes a run-time panic.
3434
//
35-
// Type values are comparable, such as with the == operator.
35+
// Type values are comparable, such as with the == operator, and Type can be
36+
// used as a map key type.
3637
// Two Type values are equal if they represent identical types.
3738
type Type interface {
3839
// Methods applicable to all types.

0 commit comments

Comments
 (0)