What version of Go are you using (go version)?
go version go1.10.1 linux/amd64 and go version devel +5f5168e Thu Apr 26 18:59:07 2018 +0000 linux/amd64
What did you do?
package main
var statictmp_0 string
var a []int
func init() {
a = []int{ 7 }
}
func main() {
println(a[0])
}
compiling this produces the error:
./teststatic.go:7:11: statictmp_0 redeclared in this block
previous declaration at ./teststatic.go:3:5
What version of Go are you using (
go version)?go version go1.10.1 linux/amd64andgo version devel +5f5168e Thu Apr 26 18:59:07 2018 +0000 linux/amd64What did you do?
compiling this produces the error: