]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: use %v for Node formatting
authorAlberto Donizetti <alb.donizetti@gmail.com>
Sat, 28 Sep 2019 12:33:10 +0000 (14:33 +0200)
committerMatthew Dempsky <mdempsky@google.com>
Sat, 28 Sep 2019 13:50:34 +0000 (13:50 +0000)
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 <alb.donizetti@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/gc/fmt.go

index b401215898e1accda945ed2feb00f43938a9e85d..3bb2df9917409deb0471e9ebb45b04f19ed6b110 100644 (file)
@@ -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)