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

Comments

Projects
None yet
4 participants
@bontibon
Copy link
Contributor

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

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

commented Jun 19, 2018

@griesemer griesemer self-assigned this Jun 19, 2018

@gopherbot

This comment has been minimized.

Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.