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>
1 file changed