aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/reflect/type.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/reflect/type.go b/src/reflect/type.go
index 39414fc2a6..df863ae106 100644
--- a/src/reflect/type.go
+++ b/src/reflect/type.go
@@ -107,10 +107,14 @@ type Type interface {
// ConvertibleTo reports whether a value of the type is convertible to type u.
// Even if ConvertibleTo returns true, the conversion may still panic.
+ // For example, a slice of type []T is convertible to *[N]T,
+ // but the conversion will panic if its length is less than N.
ConvertibleTo(u Type) bool
// Comparable reports whether values of this type are comparable.
// Even if Comparable returns true, the comparison may still panic.
+ // For example, values of interface type are comparable,
+ // but the comparison will panic if their dynamic type is not comparable.
Comparable() bool
// Methods applicable only to some types, depending on Kind.