]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix conversion error message for printed slices
authorEmmanuel Odeke <emm.odeke@gmail.com>
Sat, 30 Jul 2016 08:45:27 +0000 (01:45 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Thu, 2 Feb 2017 05:10:22 +0000 (05:10 +0000)
commitdba0d38298f0af466274795ce35ad5f310b391db
treef51aa74d2da90c27a8e92b54e6b1ebe71488e88d
parentb443babad49f90e9507d91819736c97a7495e308
cmd/compile: fix conversion error message for printed slices

Fixes #15055.

Updates exprfmt printing using fmt verb "%v" to check that n.Left
is non-nil before attempting to print it, otherwise we'll print
the nodes in the list using verb "%.v".

Credit to @mdempsky for this approach and for finding
the root cause of the issue.

Change-Id: I20a6464e916dc70d5565e145164bb9553e5d3865
Reviewed-on: https://go-review.googlesource.com/25361
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/compile/internal/gc/fmt.go
test/fixedbugs/issue15055.go [new file with mode: 0644]