From 2c47caa900cb4aca9ab9e802289fa0671ad843a4 Mon Sep 17 00:00:00 2001 From: Alberto Donizetti Date: Sat, 28 Sep 2019 14:33:10 +0200 Subject: [PATCH] cmd/compile: use %v for Node formatting CL 197817 replaced a use of n.Rlist with n.Right in a Fprintf call, but it left the corresponding format as %.v, which broke the TestFormats test on the longtest builder. Since with n.Right is custom to use %v (and not %.v), replace the format with %v. Fixes the longtest builder. Change-Id: Icf5bf820a936c51e633c25ada1a71a1ffb6d28c2 Reviewed-on: https://go-review.googlesource.com/c/go/+/197837 Run-TryBot: Alberto Donizetti TryBot-Result: Gobot Gobot Reviewed-by: Matthew Dempsky --- src/cmd/compile/internal/gc/fmt.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cmd/compile/internal/gc/fmt.go b/src/cmd/compile/internal/gc/fmt.go index b401215898..3bb2df9917 100644 --- a/src/cmd/compile/internal/gc/fmt.go +++ b/src/cmd/compile/internal/gc/fmt.go @@ -945,7 +945,8 @@ func (n *Node) stmtfmt(s fmt.State, mode fmtMode) { fallthrough case OAS2DOTTYPE, OAS2FUNC, OAS2MAPR, OAS2RECV: - mode.Fprintf(s, "%.v = %.v", n.List, n.Right) + mode.Fprintf(s, "%.v = %v", n.List, n.Right) + case ORETURN: mode.Fprintf(s, "return %.v", n.List)