mirror of
https://github.com/golang/go
synced 2024-11-18 20:24:41 -07:00
cmd/compile: remove nil check for p in isReflectPkg
CL 228859 refactored detecting reflect package logic in to isReflectPkg function. The function has un-necessary nil check for p, so remove that check. Passes toolstash-check. Change-Id: I2f3f1ac967fe8d176dda3f3b4698ded08602e2fa Reviewed-on: https://go-review.googlesource.com/c/go/+/228861 Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
bbf480a8c5
commit
7711bad100
@ -47,10 +47,6 @@ func isRuntimePkg(p *types.Pkg) bool {
|
|||||||
|
|
||||||
// isReflectPkg reports whether p is package reflect.
|
// isReflectPkg reports whether p is package reflect.
|
||||||
func isReflectPkg(p *types.Pkg) bool {
|
func isReflectPkg(p *types.Pkg) bool {
|
||||||
// TODO(cuonglm): how to get rid this check.
|
|
||||||
if p == nil {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
if p == localpkg {
|
if p == localpkg {
|
||||||
return myimportpath == "reflect"
|
return myimportpath == "reflect"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user