]> Cypherpunks repositories - gostls13.git/commit
go/types: don't override x.mode before using it
authorRobert Griesemer <gri@golang.org>
Fri, 20 Aug 2021 04:35:57 +0000 (21:35 -0700)
committerRobert Griesemer <gri@golang.org>
Sat, 21 Aug 2021 00:55:22 +0000 (00:55 +0000)
commite17439e0877d6ddb6881d9eb59758c27cc62f930
tree857c98b3b4d25c80bfb942664fbd119f6f1c1489
parentc9912780ab3ecea3c685bfc8bec229c0d2b09317
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.

Needs to be back-ported to 1.17.

Fixes #47777.

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>
src/go/types/call.go