Please answer these questions before submitting your issue. Thanks!
- What version of Go are you using (
go version)?
The current play.golang.org version.
- What operating system and processor architecture are you using (
go env)?
The current play.golang.org version.
See https://play.golang.org/p/ISPl1bA6OP:
package main
import (
"fmt"
)
var x int = y
var y int = x
func main() {
fmt.Println(x, y)
}
- What did you expect to see?
This:
prog.go:7: initialization loop:
prog.go:7 x refers to y
prog.go:9 y refers to x
- What did you see instead?
This:
prog.go:7: initialization loop:
prog.go:7 x refers to
prog.go:9 y refers to
prog.go:7 x
Please answer these questions before submitting your issue. Thanks!
go version)?The current play.golang.org version.
go env)?The current play.golang.org version.
See https://play.golang.org/p/ISPl1bA6OP:
This:
This: