diff options
author | Robert Griesemer <gri@golang.org> | 2021-08-04 21:17:54 -0700 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2021-08-06 20:34:48 +0000 |
commit | 3a9fd99849bbd9eab7e4e14a4dda95239c41ab83 (patch) | |
tree | 4302127258b7b42d36b176d165a4f7abe13521b3 /src/cmd/compile/internal/syntax/walk.go | |
parent | c3b57af8bc0fb4fe9b30e42891e9aff54c0c7a82 (diff) | |
download | go-3a9fd99849bbd9eab7e4e14a4dda95239c41ab83.tar.gz go-3a9fd99849bbd9eab7e4e14a4dda95239c41ab83.zip |
[dev.typeparams] cmd/compile/internal/syntax: cleanup panic calls
End-users are not expected to deal with the details of panics,
so providing extra information such as an "internal error" prefix
is not helpful.
Matches the types2 changes made in https://golang.org/cl/339969 .
Change-Id: Icb34a9daab981a84f41f8ae7ae5dc1b85b2d2c81
Reviewed-on: https://go-review.googlesource.com/c/go/+/339904
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Diffstat (limited to 'src/cmd/compile/internal/syntax/walk.go')
-rw-r--r-- | src/cmd/compile/internal/syntax/walk.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/syntax/walk.go b/src/cmd/compile/internal/syntax/walk.go index ef213daf7d..b025844204 100644 --- a/src/cmd/compile/internal/syntax/walk.go +++ b/src/cmd/compile/internal/syntax/walk.go @@ -70,7 +70,7 @@ type walker struct { func (w walker) node(n Node) { if n == nil { - panic("invalid syntax tree: nil node") + panic("nil node") } w.v = w.v.Visit(n) |