Commit 36c17176 authored by Robert Griesemer's avatar Robert Griesemer Committed by Cherry Mui
Browse files

[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: default avatarMatthew 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: default avatarRobert Findley <rfindley@google.com>
Trust: Robert Findley <rfindley@google.com>
Trust: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
parent 678b07d5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment