mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
go/token: remove unreachable code
Reported by go vet. Change-Id: I6a6a636c79923fafd8c649c583383cdf455c6ce2 Reviewed-on: https://go-review.googlesource.com/c/go/+/678317 Reviewed-by: Robert Findley <rfindley@google.com> Reviewed-by: Alan Donovan <adonovan@google.com> Auto-Submit: Michael Pratt <mpratt@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
parent
0c0094c893
commit
74b70eead7
1 changed files with 6 additions and 2 deletions
|
|
@ -325,7 +325,9 @@ func (t *tree) set(file *File, pos **node, parent *node) {
|
|||
// This code path isn't currently needed
|
||||
// because FileSet never updates an existing entry.
|
||||
// Remove this assertion if things change.
|
||||
panic("unreachable according to current FileSet requirements")
|
||||
if true {
|
||||
panic("unreachable according to current FileSet requirements")
|
||||
}
|
||||
x.file = file
|
||||
return
|
||||
}
|
||||
|
|
@ -344,7 +346,9 @@ func (t *tree) delete(pos **node) {
|
|||
// This code path isn't currently needed because FileSet
|
||||
// only calls delete after a positive locate.
|
||||
// Remove this assertion if things change.
|
||||
panic("unreachable according to current FileSet requirements")
|
||||
if true {
|
||||
panic("unreachable according to current FileSet requirements")
|
||||
}
|
||||
return
|
||||
|
||||
case x.left == nil:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue