Skip to content
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: incorrect line number in channel select error #25958

Closed
bontibon opened this issue Jun 19, 2018 · 3 comments
Closed

cmd/compile: incorrect line number in channel select error #25958

bontibon opened this issue Jun 19, 2018 · 3 comments
Assignees
Milestone

Comments

@bontibon
Copy link
Contributor

@bontibon bontibon commented Jun 19, 2018

go version devel +c99300229 Mon Jun 18 23:20:57 2018 +0000 linux/amd64

package main

func main() {
	done := make(chan struct{}) // line 4
	select {
	case done:                  // line 6
	}
}

Output:

./x.go:4:2: select case must be receive, send or assign recv
./x.go:6:7: done evaluated but not used
@bontibon

This comment has been minimized.

Copy link
Contributor Author

@bontibon bontibon commented Jun 19, 2018

Correct output in 1.9, broken in 1.10.

@ianlancetaylor ianlancetaylor added this to the Go1.11 milestone Jun 19, 2018
@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Jun 19, 2018

@griesemer griesemer self-assigned this Jun 19, 2018
@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Jun 19, 2018

Change https://golang.org/cl/119755 mentions this issue: cmd/compile: more accurate position for select case error message

@gopherbot gopherbot closed this in 707ca18 Jun 19, 2018
@golang golang locked and limited conversation to collaborators Jun 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.