On 12 November 2016 at 07:33, imd3c <vvv.poc...@gmail.com> wrote: > package main > > import ( > "fmt" > ) > > func main() { > /* > s := "*/" > */ > > fmt.Println("Hello, playground") > }
And asked if this: > > tmp/sandbox035254559/main.go:9: newline in string > tmp/sandbox035254559/main.go:10: syntax error: unexpected /, expecting > expression > tmp/sandbox035254559/main.go:12: syntax error: unexpected fmt at end of > statemen was a compiler bug. No, it isn't. The comment finishes with the */. Then there's a ", starting a double-quoted string literal. Then there's a newline, which is illegal in a double-quoted string literal. The insides of comments are not tokenised. Chris -- Chris "allusive" Dollin -- 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.