aboutsummaryrefslogtreecommitdiff
path: root/test/escape_slice.go
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2023-09-06 14:00:30 -0700
committerGopher Robot <gobot@golang.org>2023-09-08 18:50:24 +0000
commit18c6ec1e4a62d25ce9801174c1c17360eb95233c (patch)
treeadfcf0d69f611aae2a688fa38db1dd3babf3ca54 /test/escape_slice.go
parentc6d550a6683cebb2a11d7fa91823edf7db1d58a5 (diff)
downloadgo-18c6ec1e4a62d25ce9801174c1c17360eb95233c.tar.gz
go-18c6ec1e4a62d25ce9801174c1c17360eb95233c.zip
cmd/compile/internal/noder: stop preserving original const strings
One of the more tedious quirks of the original frontend (i.e., typecheck) to preserve was that it preserved the original representation of constants into the backend. To fit into the unified IR model, I ended up implementing a fairly heavyweight workaround: simply record the original constant's string expression in the export data, so that diagnostics could still report it back, and match the old test expectations. But now that there's just a single frontend to support, it's easy enough to just update the test expectations and drop this support for "raw" constant expressions. Change-Id: I1d859c5109d679879d937a2b213e777fbddf4f2f Reviewed-on: https://go-review.googlesource.com/c/go/+/526376 Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Diffstat (limited to 'test/escape_slice.go')
-rw-r--r--test/escape_slice.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/escape_slice.go b/test/escape_slice.go
index 7f94a755b9..65181e57d7 100644
--- a/test/escape_slice.go
+++ b/test/escape_slice.go
@@ -137,7 +137,7 @@ const (
var v4InV6Prefix = []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff}
func IPv4(a, b, c, d byte) IP {
- p := make(IP, IPv6len) // ERROR "make\(IP, IPv6len\) escapes to heap"
+ p := make(IP, IPv6len) // ERROR "make\(IP, 16\) escapes to heap"
copy(p, v4InV6Prefix)
p[12] = a
p[13] = b