]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix reassignVisitor
authorMatthew Dempsky <mdempsky@google.com>
Fri, 30 Oct 2020 17:36:31 +0000 (10:36 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Fri, 30 Oct 2020 19:30:44 +0000 (19:30 +0000)
commit7191f1136b1526703c5af7fc04ff948e3a6c26b9
tree5a7bb4d489ef26398b11663a071f38db2f2e4bbc
parentb53df56001a6bd375b1dc2026908f331729cd731
cmd/compile: fix reassignVisitor

reassignVisitor was short-circuiting on assignment statements after
checking the LHS, but there might be further assignment statements
nested within the RHS expressions.

Fixes #42284.

Change-Id: I175eef87513b973ed5ebe6a6527adb9766dde6cf
Reviewed-on: https://go-review.googlesource.com/c/go/+/266618
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: David Chase <drchase@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
src/cmd/compile/internal/gc/inl.go
test/fixedbugs/issue42284.dir/a.go [new file with mode: 0644]
test/fixedbugs/issue42284.dir/b.go [new file with mode: 0644]
test/fixedbugs/issue42284.go [new file with mode: 0644]