aboutsummaryrefslogtreecommitdiff
path: root/test/escape5.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/escape5.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/escape5.go')
-rw-r--r--test/escape5.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/escape5.go b/test/escape5.go
index 089130dad5..133d973ba5 100644
--- a/test/escape5.go
+++ b/test/escape5.go
@@ -151,7 +151,7 @@ func f9() {
func f10() {
// These don't escape but are too big for the stack
var x [1 << 30]byte // ERROR "moved to heap: x"
- var y = make([]byte, 1<<30) // ERROR "make\(\[\]byte, 1 << 30\) escapes to heap"
+ var y = make([]byte, 1<<30) // ERROR "make\(\[\]byte, 1073741824\) escapes to heap"
_ = x[0] + y[0]
}