aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorZxilly <zhouxinyu1001@gmail.com>2024-02-22 21:09:55 +0000
committerRobert Griesemer <gri@google.com>2024-02-27 16:22:24 +0000
commit856355a9133a3c96efcd35f355637d33c9fde7ea (patch)
tree3e533cf1ffd4d2092ce5875b5ef66c6d02ea79e5 /test
parentf326b3e2b3761ae4562204a5faee41b4d5211502 (diff)
downloadgo-856355a9133a3c96efcd35f355637d33c9fde7ea.tar.gz
go-856355a9133a3c96efcd35f355637d33c9fde7ea.zip
cmd/compile: use quotes to wrap user-supplied token
Use quotes to wrap user-supplied token in the syntax error message. Updates #65790 Change-Id: I631a63df4a6bb8615b7850a324d812190bc15f30 GitHub-Last-Rev: f291e1d5a6adee558d21bb7e0a3a17471bad7eb6 GitHub-Pull-Request: golang/go#65840 Reviewed-on: https://go-review.googlesource.com/c/go/+/565518 Reviewed-by: Carlos Amedee <carlos@golang.org> Reviewed-by: Robert Griesemer <gri@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'test')
-rw-r--r--test/fixedbugs/issue20789.go2
-rw-r--r--test/fixedbugs/issue23664.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/test/fixedbugs/issue20789.go b/test/fixedbugs/issue20789.go
index 4e4eed42a7..cba1290957 100644
--- a/test/fixedbugs/issue20789.go
+++ b/test/fixedbugs/issue20789.go
@@ -10,4 +10,4 @@
// there yet, so put it here for now. See also #20800.)
package e
-func([<-chan<-[func u){go // ERROR "unexpected u" \ No newline at end of file
+func([<-chan<-[func u){go // ERROR "unexpected `u'" \ No newline at end of file
diff --git a/test/fixedbugs/issue23664.go b/test/fixedbugs/issue23664.go
index 715654be70..fe171c27d0 100644
--- a/test/fixedbugs/issue23664.go
+++ b/test/fixedbugs/issue23664.go
@@ -9,9 +9,9 @@
package p
func f() {
- if f() true { // ERROR "unexpected true, expected {"
+ if f() true { // ERROR "unexpected `true', expected {"
}
- switch f() true { // ERROR "unexpected true, expected {"
+ switch f() true { // ERROR "unexpected `true', expected {"
}
}