Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support variable delayed loading #1544

Open
visualfc opened this issue Nov 14, 2023 · 0 comments
Open

support variable delayed loading #1544

visualfc opened this issue Nov 14, 2023 · 0 comments

Comments

@visualfc
Copy link
Member

visualfc commented Nov 14, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants