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 internal compiler error after parse error #14006

Closed
rsc opened this issue Jan 18, 2016 · 1 comment
Closed

cmd/compile internal compiler error after parse error #14006

rsc opened this issue Jan 18, 2016 · 1 comment
Milestone

Comments

@rsc
Copy link
Contributor

rsc commented Jan 18, 2016

Only fix for Go 1.6 if trivial.

$ cat x.go
package p

func f() {
    var x int
    switch x{
    case 1: 2:
    }

    var y string
    switch y {
    case "foo": "bar":
    }
}
$ go1.5 tool compile x.go
x.go:6: missing statement after label
x.go:6: syntax error: unexpected :, expecting case or default or }
x.go:11: missing statement after label
x.go:11: syntax error: unexpected :, expecting case or default or }
$ go tool compile x.go
x.go:6: internal compiler error: newname nil
$
@rsc rsc added this to the Go1.6Maybe milestone Jan 18, 2016
@griesemer
Copy link
Contributor

Fix is safe and straight-forward: https://go-review.googlesource.com/18736

@griesemer griesemer modified the milestones: Go1.6, Go1.6Maybe Jan 19, 2016
@golang golang locked and limited conversation to collaborators Jan 18, 2017
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

3 participants