mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: extract gc.eqtype as types.Identical
For symmetry with go/types.Identical. Passes toolstash-check. Change-Id: Id19c3956e44ed8e2d9f203d15824322cc5842d3d Reviewed-on: https://go-review.googlesource.com/c/143180 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
parent
a440cc0d70
commit
2d58fbac2f
13 changed files with 161 additions and 155 deletions
|
|
@ -872,7 +872,7 @@ opSwitch:
|
|||
// it is also a dereference, because it is implicitly
|
||||
// dereferenced (see #12588)
|
||||
if n.Type.IsArray() &&
|
||||
!(n.Right.Type.IsPtr() && eqtype(n.Right.Type.Elem(), n.Type)) {
|
||||
!(n.Right.Type.IsPtr() && types.Identical(n.Right.Type.Elem(), n.Type)) {
|
||||
e.escassignWhyWhere(n.List.Second(), n.Right, "range", n)
|
||||
} else {
|
||||
e.escassignDereference(n.List.Second(), n.Right, e.stepAssignWhere(n.List.Second(), n.Right, "range-deref", n))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue