mirror of
https://github.com/golang/go
synced 2024-11-23 17:30:02 -07:00
go/internal/gccgoimporter: remove guard on some assertions
Remove unnecessary conditional guard for a couple of assertions in the type parser's update() method (inspired by comment from Robert). No change in functionality. Change-Id: I706a54569e75c6960768247889b7dec3f267dde9 Reviewed-on: https://go-review.googlesource.com/c/go/+/194565 Run-TryBot: Than McIntosh <thanm@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
parent
de4c0730cb
commit
cb30430af8
@ -475,13 +475,11 @@ func (p *parser) reserve(n int) {
|
||||
// used to resolve pointers to named types in case they are referenced
|
||||
// by embedded fields.
|
||||
func (p *parser) update(t types.Type, nlist []interface{}) {
|
||||
if len(nlist) != 0 {
|
||||
if t == reserved {
|
||||
p.errorf("internal error: update(%v) invoked on reserved", nlist)
|
||||
}
|
||||
if t == nil {
|
||||
p.errorf("internal error: update(%v) invoked on nil", nlist)
|
||||
}
|
||||
if t == reserved {
|
||||
p.errorf("internal error: update(%v) invoked on reserved", nlist)
|
||||
}
|
||||
if t == nil {
|
||||
p.errorf("internal error: update(%v) invoked on nil", nlist)
|
||||
}
|
||||
for _, n := range nlist {
|
||||
switch n := n.(type) {
|
||||
|
Loading…
Reference in New Issue
Block a user