[release-branch.go1.17] go/types: don't override x.mode before using it
Changing the mode of x before using the old value is clearly wrong. And x is not needed anymore afterward so besides being misplaced, the assignment is not needed in the first place. Tested manually as it's a bit complicated to set up a test. Fixes #47854. Change-Id: I06f1fa9443eb98009b4276f566d557fd52f1d6d3 Reviewed-on: https://go-review.googlesource.com/c/go/+/343809 Trust: Robert Griesemer <gri@golang.org> Reviewed-by:Matthew Dempsky <mdempsky@google.com> (cherry picked from commit e17439e0) Reviewed-on: https://go-review.googlesource.com/c/go/+/347149 Run-TryBot: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Findley <rfindley@google.com> Reviewed-by:
Robert Findley <rfindley@google.com> Trust: Robert Findley <rfindley@google.com> Trust: Cherry Mui <cherryyz@google.com> TryBot-Result: Go Bot <gobot@golang.org>
Loading
Please sign in to comment