mirror of
https://github.com/golang/go
synced 2024-11-23 07:20:06 -07:00
reflect: remove dead v.typ assignment
v is not a pointer receiver, and v.typ isn't used in the lines below. The assignment is dead. Remove it. Keep the comment, as it refers to the whole case block and not just the removed line. Change-Id: Icb2d20c287d9a41bf620ebe5cdec764cd84178a7 Reviewed-on: https://go-review.googlesource.com/43134 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
c061f51e72
commit
19b05acd13
@ -2164,7 +2164,6 @@ func (v Value) assignTo(context string, dst *rtype, target unsafe.Pointer) Value
|
||||
case directlyAssignable(dst, v.typ):
|
||||
// Overwrite type so that they match.
|
||||
// Same memory layout, so no harm done.
|
||||
v.typ = dst
|
||||
fl := v.flag & (flagRO | flagAddr | flagIndir)
|
||||
fl |= flag(dst.Kind())
|
||||
return Value{dst, v.ptr, fl}
|
||||
|
Loading…
Reference in New Issue
Block a user