Skip to content

Commit

Permalink
go/parser: use valid position when reporting an error (copy-paste bug)
Browse files Browse the repository at this point in the history
This is a follow-up on https://golang.org/cl/202581.

Updates golang#33649.

Change-Id: Ib078fed983792c5493bdbed6d33e21b86856894a
Reviewed-on: https://go-review.googlesource.com/c/go/+/204041
Run-TryBot: Robert Griesemer <[email protected]>
Run-TryBot: Rebecca Stambler <[email protected]>
Reviewed-by: Rebecca Stambler <[email protected]>
  • Loading branch information
griesemer committed Oct 29, 2019
1 parent 1d4369f commit 07b72d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/go/parser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ func (p *parser) expect2(tok token.Token) (pos token.Pos) {
if p.tok == tok {
pos = p.pos
} else {
p.errorExpected(pos, "'"+tok.String()+"'")
p.errorExpected(p.pos, "'"+tok.String()+"'")
}
p.next() // make progress
return
Expand Down

0 comments on commit 07b72d9

Please sign in to comment.