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

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
be tweaked.

This lets us remove the code that recorded whether an Unknown_expression
is a composite literal key.

Change-Id: Ida38800a17dcd0bc0e47f636e021d5f2d4fc191d
Reviewed-by: Than McIntosh <>
4 files changed