]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.8] cmd/compile/internal/syntax: avoid follow-up error for incorre...
authorRobert Griesemer <gri@golang.org>
Tue, 7 Feb 2017 06:01:07 +0000 (22:01 -0800)
committerRuss Cox <rsc@golang.org>
Tue, 7 Feb 2017 16:52:00 +0000 (16:52 +0000)
commit6eb0f5440e7034235544001faa675a0945a1ba7b
treec32bb2de64117bfe2651f0bfea293f8f61b0457e
parentc543cc353deb4cffe213be5b094c8357faecab07
[release-branch.go1.8] cmd/compile/internal/syntax: avoid follow-up error for incorrect if statement

This is a follow-up on https://go-review.googlesource.com/36470
and leads to a more stable fix. The above CL relied on filtering
of multiple errors on the same line to avoid more than one error
for an `if` statement of the form `if a := 10 {}`. This CL avoids
the secondary error ("missing condition in if statement") in the
first place.

For #18915.

Change-Id: I8517f485cc2305965276c17d8f8797d61ef9e999
Reviewed-on: https://go-review.googlesource.com/36479
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-on: https://go-review.googlesource.com/36424
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/cmd/compile/internal/syntax/parser.go