]> Cypherpunks repositories - gostls13.git/commit
go/types, types2: improve printing of []*operand lists (debugging support)
authorRobert Griesemer <gri@google.com>
Wed, 26 Nov 2025 00:26:25 +0000 (16:26 -0800)
committerGopher Robot <gobot@golang.org>
Wed, 26 Nov 2025 20:38:54 +0000 (12:38 -0800)
commitefe9ad501d94743d87e500a7ba0b1732a89e9afd
tree786bd2025720b3e197600bb5b729ea50af3270ad
parentac3369242d3a6d6219fdf1d592effc5e51ddfeb8
go/types, types2: improve printing of []*operand lists (debugging support)

Special-case an sprintf argument of []*operand type, similar to what
we do for other lists. As a result a list of operands is printed as
[a, b, c] rather than [a b c] (default formatting for slices).

(We could factor out this code into a generic function, but this is
a minimally intrusive change at this point.)

Change-Id: Iea4fc6ea375dd9618316b7317a77b57b4e35544d
Reviewed-on: https://go-review.googlesource.com/c/go/+/724500
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Mark Freeman <markfreeman@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
src/cmd/compile/internal/types2/format.go
src/go/types/format.go