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: syntax error while parsing label #13539

Closed
neild opened this issue Dec 8, 2015 · 2 comments
Closed

cmd/compile: syntax error while parsing label #13539

neild opened this issue Dec 8, 2015 · 2 comments
Milestone

Comments

@neild
Copy link
Contributor

neild commented Dec 8, 2015

package label_test
import "testing"
func TestLabel(t *testing.T) {
testing:
        for _ = range []int{} {
                break testing
        }
}
$ go version
go version go1.5.1 linux/amd64
$ go test .
ok      _/home/dneil/src/label 0.010s
$ ~/go/bin/go version
go version devel +10d1d5b Tue Dec 8 22:23:06 2015 +0000 linux/amd64
$ ~/go/bin/go test .
# _/home/dneil/src/label_test
./label_test.go:6: syntax error: unexpected :, expecting semicolon or newline or }
FAIL    _/home/dneil/src/label [build failed]
@ianlancetaylor ianlancetaylor changed the title cmd/go: syntax error while parsing label cmd/compile: syntax error while parsing label Dec 8, 2015
@ianlancetaylor ianlancetaylor added this to the Go1.6 milestone Dec 8, 2015
@griesemer
Copy link
Contributor

On it. Seems to have something to do with the fact that the label name and the imported package name are the same...

@gopherbot
Copy link

CL https://golang.org/cl/17600 mentions this issue.

@golang golang locked and limited conversation to collaborators Dec 14, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants