reflect: add comment about the doubled semantics of Value.String.
R=rsc
CC=golang-dev
https://golang.org/cl/5091044
diff --git a/src/pkg/reflect/value.go b/src/pkg/reflect/value.go
index 8e5a628..1cace3f 100644
--- a/src/pkg/reflect/value.go
+++ b/src/pkg/reflect/value.go
@@ -1444,6 +1444,8 @@
case String:
return *(*string)(iv.addr)
}
+ // If you call String on a reflect.Value of other type, it's better to
+ // print something than to panic. Useful in debugging.
return "<" + iv.typ.String() + " Value>"
}