golang / go

The Go programming language

Home Page:https://go.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cmd/compile: wrong line number in error message

dvyukov opened this issue · comments

newparser/oldparser disagree:

0

$ go tool compile b6589fc6ab0dc82cf12099d1c2d40ab994e8410c
b6589fc6ab0dc82cf12099d1c2d40ab994e8410c:2: syntax error: package statement must be first
$ go tool compile -oldparser b6589fc6ab0dc82cf12099d1c2d40ab994e8410c
b6589fc6ab0dc82cf12099d1c2d40ab994e8410c:1: package statement must be first

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

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

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