1
0
mirror of https://github.com/golang/go synced 2024-11-22 05:14:40 -07:00

go/types, types2: remove superfluous if statement (minor cleanup)

Found while re-reading this code.

Change-Id: I5c87bb38ce07e49f1d122db1630c48d5ff082a30
Reviewed-on: https://go-review.googlesource.com/c/go/+/594975
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Tim King <taking@google.com>
This commit is contained in:
Robert Griesemer 2024-06-25 12:47:20 -07:00 committed by Gopher Robot
parent 1b7285d1ab
commit 77a3c3b984
2 changed files with 2 additions and 6 deletions

View File

@ -560,9 +560,7 @@ L: // unpack receiver type
}
// unpack receiver name
if name, _ := rtyp.(*syntax.Name); name != nil {
rname = name
}
rname, _ = rtyp.(*syntax.Name)
return
}

View File

@ -545,9 +545,7 @@ L: // unpack receiver type
}
// unpack receiver name
if name, _ := rtyp.(*ast.Ident); name != nil {
rname = name
}
rname, _ = rtyp.(*ast.Ident)
return
}