-
Notifications
You must be signed in to change notification settings - Fork 18k
gccgo: wrong PkgPath for embedded struct field in package main #10173
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
Comments
@ianlancetaylor you want a bugzilla for this? |
Just filing an issue here should be fine.
The underlying problem: https://play.golang.org/p/ByKziK5maw
gccgo returns "main" for the PkgPath, but gc correctly returns "" for
PkgPath.
|
I had already hacked that code to return "" and it causes a reflection error on the access of a private method later on. Using this version of encoding with all types of print statements added
|
Isn't this the same problem as #7247? |
Yes. |
Even if you turn that flag off you will still get problems. Will have to research this more. |
found this error porting https://github.com/metaleap/go-xsd to gcccode.
It seems that the reflection is failing here. The sub object is private but the field contained is public.
This is different in gccgo than go playground.
see https://play.golang.org/p/w_FzGI3LvW
Output with the playground
output with gcc-go-5
using gccgo-5 (Debian 5-20150226-1) 5.0.0 20150226 (experimental) [trunk revision 220999]
The text was updated successfully, but these errors were encountered: