]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: avoid follow-on errors for literals with syntax errors
authorRobert Griesemer <gri@golang.org>
Thu, 29 Aug 2019 21:31:40 +0000 (14:31 -0700)
committerRobert Griesemer <gri@golang.org>
Thu, 29 Aug 2019 23:37:07 +0000 (23:37 +0000)
commit5411953df50ce83ee8e23ca33a8a16335ad95cf2
tree020e5b5b4aa439359efa6882d772cb8ce1c53ef3
parent117400ec095335f24e5363f61d60f8baad6be3ce
cmd/compile: avoid follow-on errors for literals with syntax errors

- only convert literal strings if there were no syntax errors
  (some of the conversion routines exit if there is an error)
- mark nodes for literals with syntax errors to avoid follow-on
  errors
- don't attempt to import packages whose path had syntax errors

Fixes #32133.

Change-Id: I1803ad48c65abfecf6f48ddff1e27eded5e282c5
Reviewed-on: https://go-review.googlesource.com/c/go/+/192437
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/gc/noder.go
test/fixedbugs/issue32133.go [new file with mode: 0644]