See https://play.golang.org/p/cO4LQFk7ew-
Given a struct definition type S struct { a, b int } an if statement of the form if x == S{ 0, 1 } { ... } yields compile errors such as prog.go:19:18: syntax error: unexpected }, expecting := or = or comma prog.go:22:1: syntax error: non-declaration statement outside function body Why? Perhaps I'm missing something, but I can't see anything in the spec that forbids this. Obviously I can code around this, but is it a bug that should be reported? -- 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. For more options, visit https://groups.google.com/d/optout.