summaryrefslogtreecommitdiff
path: root/src/lib/fmt/print.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/fmt/print.go')
-rw-r--r--src/lib/fmt/print.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/fmt/print.go b/src/lib/fmt/print.go
index ca5bec934..5fd230f2c 100644
--- a/src/lib/fmt/print.go
+++ b/src/lib/fmt/print.go
@@ -451,12 +451,11 @@ func (p *pp) printField(field reflect.Value) (was_string bool) {
}
p.add('}');
case reflect.InterfaceKind:
- inter := field.(reflect.InterfaceValue).Get();
- if inter == nil {
+ value := field.(reflect.InterfaceValue).Value();
+ if value == nil {
s = "<nil>"
} else {
- // should never happen since a non-nil interface always has a type
- s = "<non-nil interface>";
+ return p.printField(value);
}
default:
s = "?" + field.Type().String() + "?";