New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/compile: compiler errors should quote user-provided names where they are used "in sentence" of an error message #65790
Comments
Fair enough. We've been trying to avoid "punctuation" but it probably will be clearer to quote user-provided names (at least in some cases like this). |
Change https://go.dev/cl/565518 mentions this issue: |
Use quotes to wrap user-supplied token in the syntax error message. Updates #65790 Change-Id: I631a63df4a6bb8615b7850a324d812190bc15f30 GitHub-Last-Rev: f291e1d GitHub-Pull-Request: #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>
Testdata is called testdata/issue65970.go while this issue is #65790 |
@fukanchik Thanks for pointing this out. Will fix. |
Change https://go.dev/cl/567875 mentions this issue: |
Leaving this issue open to review other locations (such as the type checker) where a name is used within an error sentence and where it may be confusing. |
Follow-up on CL 565518 which addressed issue #65790 but added testdata/issue65970.go instead of testdata/issue65790.go. Rename that file to match the issue. For #65790. Change-Id: I647c297286355137fa950fb6722e31ae4340393b Reviewed-on: https://go-review.googlesource.com/c/go/+/567875 Reviewed-by: Robert Griesemer <gri@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Auto-Submit: Robert Griesemer <gri@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Change https://go.dev/cl/571396 mentions this issue: |
Go version
go version devel go1.23-4a7f3ac8eb Sat Feb 10 02:14:22 2024 +0000 linux/amd64
Output of
go env
in your module/workspace:What did you do?
https://go.dev/play/p/cUZM3KyGHda
What did you see happen?
What did you expect to see?
"status" quoted as a user provided token, separating it from compiler status.
from #65788
cc @golang/compiler
The text was updated successfully, but these errors were encountered: