]> Cypherpunks.ru repositories - gostls13.git/commit
go/build/constraint: fix parsing of "// +build" (with no args)
authorRuss Cox <rsc@golang.org>
Tue, 18 May 2021 15:16:38 +0000 (11:16 -0400)
committerRuss Cox <rsc@golang.org>
Tue, 18 May 2021 22:36:55 +0000 (22:36 +0000)
commiteeadce2d871358306f2a95b0cfbe809ea017932a
tree2e8312b9cb9d4b347a74abacf5437cd5e2464934
parent6d2ef2ef2a3ed375b5c782e6c8b0f8a59c3d3c8c
go/build/constraint: fix parsing of "// +build" (with no args)

"// +build" by itself was like "// +build !" - unsatisfiable.
Make it so again (right now it panics).

Fixes #44487.

Change-Id: Iacbc1398af6f988ef011f9f438e792eb62f8f434
Reviewed-on: https://go-review.googlesource.com/c/go/+/320829
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
src/go/build/constraint/expr.go
src/go/build/constraint/expr_test.go