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
spec: unclear whether error should be reported for non-comparable switch expression in empty switch #43200
Comments
Change https://golang.org/cl/278132 mentions this issue: |
…d (but empty) expr switch Enable one more errorcheck test. Updates #43110. Updates #43200. Change-Id: Ib7b971d5e9989c65320579f75d65266bbbbeec53 Reviewed-on: https://go-review.googlesource.com/c/go/+/278132 Trust: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
cc: @ianlancetaylor for input on what |
gccgo says
So the message needs a little work but it has the same behavior. |
Change https://golang.org/cl/278452 mentions this issue: |
For golang/go#43200 Change-Id: I7f102bfdd5a2578e59292be4c84e11df107f65c6 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/278452 Trust: Ian Lance Taylor <iant@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org> Reviewed-by: Than McIntosh <thanm@google.com>
Change https://golang.org/cl/314411 mentions this issue: |
For:
the compiler reports an error:
Since there's no
case
in theswitch
statement, this might be considered ok. The spec is not explicitly stating that this is invalid.See also #43110.
The text was updated successfully, but these errors were encountered: