compiler: don't add composite literal keys to package bindings
Adding composite literal keys to package bindings gets confusing when
it is combined with dot imports. The test case showing the resulting
compilation failure is https://golang.org/cl/213899.
Fix this by adding a new expression type to hold composite literal keys.
We shouldn't see it during lowering if it is a struct field name,
because Composite_literal_expression::do_traverse skips struct field names.
Or, it should, but that didn't quite work with pointer types so it had to
This lets us remove the code that recorded whether an Unknown_expression
is a composite literal key.
Reviewed-by: Than McIntosh <firstname.lastname@example.org>
4 files changed