-
Notifications
You must be signed in to change notification settings - Fork 18k
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: channel element type too large compiling errors are not reported for channels named with blank identifer #20027
Comments
Why? Seems fine to me. You can't use those channels anyway, so no need reporting an unnecessary error. The errors on the named channels are because the implementation isn't able to handle them. |
I don't think this is a bug, but I can see arguments both ways (and also compilers which might complain in both cases). @mdempsky, any thoughts? |
I could see an argument for not giving an error for the plain declaration, but if the make would fail to compile when assigned to c2, I don't see any argument for compiling successfully when assigned to _. Blank assignments are supposed to have all the side effects of evaluation of the rhs. The _ assignments and c1, c2 assignments should behave the same. They do in go/types (accepts both), and here the compiler should probably reject both. |
@ianlancetaylor
|
It looks this bug has already been fixed. So anyone can verify it and close this issue now. |
Though there is still a small problem. |
Change https://go.dev/cl/612618 mentions this issue: |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.8.1 linux/amd64
What did you do?
What did you expect to see?
compiles error for the blank identifier lines
What did you see instead?
the blank identifier lines compile ok
The text was updated successfully, but these errors were encountered: