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" -- 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 golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/851cdbdf-7813-44e7-8165-5f5346ca0711o%40googlegroups.com.