-
Robert Griesemer authored
to map element keys Composite literals containing element values that are themselves composite literals may leave away the element's literal types if they are identical to the enclosing composite literal's element type. (http://golang.org/ref/spec#Composite_literals) When we made this change, we forgot to apply the analogous rule to map literal keys. This change generalizes that rule. Added more examples, including one showing the recursive application of the elision rules. This is a fully backward-compatible language change. It was discussed some time back. Fixes #8589. To be submitted once all compilers accept the extension. Change-Id: I4d45b64b5970f0d5501572945d5a097e64a9458b Reviewed-on: https://go-review.googlesource.com/2591Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Rob Pike <r@golang.org>
7727dee4