-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
compiler: fix evaluation order of LHS index expressions
The spec says that when an index expression appears on the left hand side of an assignment, the operands should be evaluated. The gofrontend code was assuming that that only referred to the index operand. But discussion of https://golang.org/issue/23188 has clarified that this means both the slice/map/string operand and the index operand. Adjust the gofrontend code accordingly. Fixes golang/go#23188 Change-Id: I90e17ada43df58d439c060344f9224dbe1e7dacd Reviewed-on: https://go-review.googlesource.com/123155 Reviewed-by: Than McIntosh <[email protected]>
- Loading branch information
1 parent
8ad67a7
commit ea7ac77
Showing
2 changed files
with
22 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters