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
inlining bug: embedded fields of builtin type not recognized on import of inlined body #2687
Labels
Comments
Owner changed to @lvdlvd. Status changed to Accepted. |
narrowed it down to embedded fields of builtin types; inlineable bodies with structure literals thereof one.go: package one type T struct { int } func New(i int) T { return T{i} } two.go: package two import "./one" func use() { _ = one.New(1) } the problem is that on import func @"".New(@"".i int) (? @"".T) { return @"".T{ @"".int:@"".i } } @"".int is not recognized as a builtin type. looking at the best way to fix this now. Labels changed: added priority-asap, compilerbug, removed priority-triage. |
I'm not going to get this fixed before sleep, sorry. I'll get to it first thing in the morning. If this is blocking you, as a quick workaround you can force any function in your case error.go NewError, to be un-inlined by adding for false {} // force outlining to it. it saves you from having to fumble with the -l flag. |
Fix pending in http://golang.org/cl/5545047/ |
This issue was closed by revision 6ff01f0. Status changed to Fixed. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Attachments:
The text was updated successfully, but these errors were encountered: