gop
gop copied to clipboard
support variable delayed loading
The following program sample.gop triggers an unexpected result
// add a sample
package main
type S string
var a, b, c, d = len(b), S(c), "hello", c + "word"
func main() {
println(a, b, c, d)
}
Expected result
5 hello hello helloword
Got
prog.go:5:22: undefined: b
prog.go:8:10: undefined: a
===> errors stack:
gop.LoadDir(".", 0xc0000d2750, false)
/root/goplus/gengo.go:159 LoadDir(dir, conf, genTestPkg)
Gop Version
main version
Additional Notes
No response