golang / go

The Go programming language

Home Page:https://go.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cmd/compile: compiles incorrect program (2)

dvyukov opened this issue · comments

package A
var f=func() {
    {
        f:=2
        _=f
        f=9
    }
$ go tool compile -oldparser /tmp/test.go
/tmp/test.go:9: syntax error: unexpected EOF
$ go tool compile /tmp/test.go

go version devel +25a28da Sun Nov 15 23:41:28 2015 +0000 linux/amd64

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