Skip to content

cmd/compile: can not use statictmp_0 as variable name #25113

@aarzilli

Description

@aarzilli

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions