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
ghost opened this issue Jun 19, 2018 · 3 comments
Closed

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

ghost opened this issue Jun 19, 2018 · 3 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@ghost
Copy link

ghost 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
@ghost
Copy link
Author

ghost commented Jun 19, 2018

Correct output in 1.9, broken in 1.10.

@ianlancetaylor ianlancetaylor added the NeedsFix The path to resolution is known, but the work has not been done. label Jun 19, 2018
@ianlancetaylor ianlancetaylor added this to the Go1.11 milestone Jun 19, 2018
@ianlancetaylor
Copy link
Contributor

CC @griesemer

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

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

@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.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

3 participants