{"action":"opened","issue":{"url":"https://api.github.com/repos/google/jsonnet/issues/244","repository_url":"https://api.github.com/repos/google/jsonnet","labels_url":"https://api.github.com/repos/google/jsonnet/issues/244/labels{/name}","comments_url":"https://api.github.com/repos/google/jsonnet/issues/244/comments","events_url":"https://api.github.com/repos/google/jsonnet/issues/244/events","html_url":"https://github.com/google/jsonnet/issues/244","id":182345351,"number":244,"title":"Desugaring of +: for field name expressions incorrectly binds self","user":{"login":"sparkprime","id":168158,"avatar_url":"https://avatars.githubusercontent.com/u/168158?v=3","gravatar_id":"","url":"https://api.github.com/users/sparkprime","html_url":"https://github.com/sparkprime","followers_url":"https://api.github.com/users/sparkprime/followers","following_url":"https://api.github.com/users/sparkprime/following{/other_user}","gists_url":"https://api.github.com/users/sparkprime/gists{/gist_id}","starred_url":"https://api.github.com/users/sparkprime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sparkprime/subscriptions","organizations_url":"https://api.github.com/users/sparkprime/orgs","repos_url":"https://api.github.com/users/sparkprime/repos","events_url":"https://api.github.com/users/sparkprime/events{/privacy}","received_events_url":"https://api.github.com/users/sparkprime/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-11T18:57:08Z","updated_at":"2016-10-11T18:57:08Z","closed_at":null,"body":"```\r\n$ jsonnet -e '{ field: {accumulator: []} { [self.f] +: [1] }, f: \"accumulator\" }'\r\nRUNTIME ERROR: Field does not exist: f\r\n        <cmdline>:1:31-36       object <anonymous>\r\n        <cmdline>:1:10-46       object <anonymous>\r\n        During manifestation\r\n```\r\n\r\nBecause the desugaring yields\r\n\r\n```\r\n{ field: {accumulator: []} { [self.f] : super[self.f] + [1] }, f: \"accumulator\" }\r\n```\r\n\r\nwhereas it should yield something like\r\n\r\n```\r\n{ field: {accumulator: []} (local outer = self; { [self.f] : super[outer.f] + [1] }), f: \"accumulator\" }\r\n```\r\n\r\n"}}
{"actor":{"display_login":"sparkprime"}}