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
cmd/go2go: cannot refer to unexported name "pkg.unexported" #43888
Comments
This is an unfortunate limitation of the It's not clear to me that we want/need to fix this in the prototype. |
This is a documented limitation of the go2go tool. https://go.googlesource.com/go/+/refs/heads/dev.go2go/src/cmd/go2go/doc.go#49 |
@griesemer @ianlancetaylor thanks for the explanation. Out of curiosity, could a |
For the special case of calling a package-scope unexported function, yes, |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
$ cat main.go2
$ cat subpkg/pkg.go2
What did you expect to see?
What did you see instead?
Exporting the
hello
func fixes the compile error.The text was updated successfully, but these errors were encountered: