Thanks for the answers. I tried to read the specs, but didn't go as far as the parsing ambiguity section :(
-- Raffaele On Mon, Oct 8, 2018 at 12:20 PM Ian Lance Taylor <[email protected]> wrote: > On Mon, Oct 8, 2018 at 12:10 PM, Raffaele Sena <[email protected]> wrote: > > > > I found a strange behavior (well, I would call it a bug) of for-range > over a > > composite literal where the literal type is a user type (or alias). This > is > > true for both maps and array/slices, but the following example is with a > > slice. > > For future notice, when asking about a strange behavior, it's always > extremely helpful to say what the strange behavior is. There are many > reasons why we might not see the same behavior. > > In this case, search for "parsing ambiguity" in > https://golang.org/ref/spec#Composite_literals . > > Ian > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
