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:
parent
1b7285d1ab
commit
77a3c3b984
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user