Good to know that.
Thanks for your response Ian.
On Thursday, October 15, 2020 at 6:42:33 PM UTC+3 Ian Davis wrote:
> On Thu, 15 Oct 2020, at 4:16 PM, Brian Candler wrote:
>
> It looks like a parsing ambiguity to me. The error suggests that the
> open-brace is being treated as the start of the body of the if-statement,
> i.e.
>
> if v := T {
> }.F()
>
> Try changing it to
>
> if v == T{}.F(); v {}
>
> and you'll get a different error: "syntax error: unexpected . at end of
> statement"
>
>
> It is a parsing ambiguity and is mentioned in the specification towards
> the end of https://golang.org/ref/spec#Composite_literals
>
>
>
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/a1163161-4f55-4ef6-b7e6-cea6ba63ddd2n%40googlegroups.com.