summaryrefslogtreecommitdiff
path: root/usr/r/reflect/tostring.go
diff options
context:
space:
mode:
Diffstat (limited to 'usr/r/reflect/tostring.go')
-rw-r--r--usr/r/reflect/tostring.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/usr/r/reflect/tostring.go b/usr/r/reflect/tostring.go
index 17a0a79fc..f60013c00 100644
--- a/usr/r/reflect/tostring.go
+++ b/usr/r/reflect/tostring.go
@@ -35,6 +35,9 @@ func TypeFieldsToString(t HasFields, sep string) string {
func TypeToString(typ Type) string {
var str string;
+ if name := typ.Name(); name != "" {
+ return name
+ }
switch(typ.Kind()) {
case MissingKind:
return "$missing$";