From: Daniel Martí Date: Wed, 10 May 2017 16:21:21 +0000 (+0200) Subject: reflect: remove dead v.typ assignment X-Git-Tag: go1.9beta1~278 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=19b05acd13da49ebff6812012d20e5ace6957b58;p=gostls13.git 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í Reviewed-by: Brad Fitzpatrick TryBot-Result: Gobot Gobot --- diff --git a/src/reflect/value.go b/src/reflect/value.go index 290d04d74a..a84af8cae9 100644 --- a/src/reflect/value.go +++ b/src/reflect/value.go @@ -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}