]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/syntax: avoid follow-up error for incorrect if statement
authorRobert Griesemer <gri@golang.org>
Tue, 7 Feb 2017 06:01:07 +0000 (22:01 -0800)
committerRobert Griesemer <gri@golang.org>
Tue, 7 Feb 2017 06:59:54 +0000 (06:59 +0000)
commit53c6ac54190ae21dd1a7dacf7f066785834407b2
tree02f04dfc58104a2c489354b5a69969b2679747bd
parent6b742b2f84fc4ddea27076aa1e581197d17bd863
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>
src/cmd/compile/internal/syntax/parser.go