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

panic if no return function set #1450

Closed
visualfc opened this issue Oct 7, 2023 · 0 comments · Fixed by goplus/gogen#281
Closed

panic if no return function set #1450

visualfc opened this issue Oct 7, 2023 · 0 comments · Fixed by goplus/gogen#281
Labels

Comments

@visualfc
Copy link
Member

visualfc commented Oct 7, 2023

The following program sample.gop triggers an unexpected result

// add a sample
func test() {
}

func main() {
	v := test()
	println v
}

Expected result

dump build source error

Got

runtime error: invalid memory address or nil pointer dereference

===> errors stack:
gop.LoadDir(".", 0xc0001860c0, false, false)
	/Users/vfc/goplus/gop/gengo.go:73 LoadDir(dir, conf, genTestPkg, prompt)
gop.GenGo(".", 0xc0001860c0, false)
	/Users/vfc/goplus/gop/build_install_run.go:115 GenGo(dir, conf, false)

Gop Version

v1.1.7

Additional Notes

No response

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

Successfully merging a pull request may close this issue.

2 participants