]> Cypherpunks repositories - gostls13.git/commit
fmt: always handle special methods if print operand is a reflect.Value
authorMartin Möhrmann <martisch@uos.de>
Sun, 9 Oct 2016 19:06:03 +0000 (21:06 +0200)
committerMartin Möhrmann <martisch@uos.de>
Tue, 18 Oct 2016 10:50:26 +0000 (10:50 +0000)
commit2ecaaf18f94cd5ad3ccd46937d36c7a68d3e69bf
treec21a608bf0066253d3aa403d2bc293b320a9a362
parentfaf882d1d427e8c8a9a1be00d8ddcab81d1e848e
fmt: always handle special methods if print operand is a reflect.Value

Check for and call the special printing and format methods such as String
at printing depth 0 when printing the concrete value of a reflect.Value.

Fixes: #16015
Change-Id: I23bd2927255b60924e5558321e98dd4a95e11c4c
Reviewed-on: https://go-review.googlesource.com/30753
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Martin Möhrmann <martisch@uos.de>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/fmt/fmt_test.go
src/fmt/print.go