-
Notifications
You must be signed in to change notification settings - Fork 17.3k
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/gc: composite literal import regression after e73800eb2b00 #4932
Labels
Milestone
Comments
Revision e73800eb2b00 is ugly. I think the correct way of fixing (which is what I originally intended), is to add a n->orig node when typechecking a &T{} literal. There is so much mutation happening afterwards that I don't understand how it can work otherwise. I've begun to write https://golang.org/cl/7437043 It needs a bit more polishing and seems to compile juju, but haven't got the time to reduce your issue to a small testcase. |
in case it helps, i narrowed down the juju code to the minimal amount that still exhibits the problem. it might be possible to make it smaller still, of course, but i'm stopping here. i ended up with three files; running "go test" in the state directory shows the problem. local/foo/foo.go: package foo type Op struct {} state/state_test.go: package state_test import "launchpad.net/juju-core/state0" type Foo *state.State state/state.go: package state import "local/foo" func Public() { var s Settings s.op() } type State struct {} func (s *State) x(*Settings) {} type Settings struct {} func (c *Settings) x() { run([]foo.Op{{}}) } func run([]foo.Op) {} func (s *Settings) op() foo.Op { return foo.Op{} } |
This issue was closed by revision b0bb6f8. 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.
The text was updated successfully, but these errors were encountered: