commit | b31fbf7d8f23508cfbd578c5c44b13eefd8f359e | [log] [tgz] |
---|---|---|
author | Ian Lance Taylor <iant@golang.org> | Thu Apr 09 17:42:37 2020 -0700 |
committer | Ian Lance Taylor <iant@golang.org> | Fri Apr 10 01:18:28 2020 +0000 |
tree | 2f0cc136307799f58aa4a99ce50a8ebee6f231ac | |
parent | 4a31d064fd6996f64b620104e849292af8f25e12 [diff] |
compiler: look up composite literal keys in the global namespace A composite literal key may not have a global definition, so Gogo::define_global_names may not see it. In order to correctly handle the case in which a predeclared identifier is used as a composite literal key, do an explicit check of the global namespace. Test case is https://golang.org/cl/227783. Change-Id: I07ca5217993b13ee2344204d2e93ec7d624f85fd Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/227784 Reviewed-by: Than McIntosh <thanm@google.com>