{"action":"opened","issue":{"url":"https://api.github.com/repos/chimpler/pyhocon/issues/87","repository_url":"https://api.github.com/repos/chimpler/pyhocon","labels_url":"https://api.github.com/repos/chimpler/pyhocon/issues/87/labels{/name}","comments_url":"https://api.github.com/repos/chimpler/pyhocon/issues/87/comments","events_url":"https://api.github.com/repos/chimpler/pyhocon/issues/87/events","html_url":"https://github.com/chimpler/pyhocon/issues/87","id":157191275,"number":87,"title":"Self-referential substitutions fail if key is a path","user":{"login":"gilles-duboscq","id":341830,"avatar_url":"https://avatars.githubusercontent.com/u/341830?v=3","gravatar_id":"","url":"https://api.github.com/users/gilles-duboscq","html_url":"https://github.com/gilles-duboscq","followers_url":"https://api.github.com/users/gilles-duboscq/followers","following_url":"https://api.github.com/users/gilles-duboscq/following{/other_user}","gists_url":"https://api.github.com/users/gilles-duboscq/gists{/gist_id}","starred_url":"https://api.github.com/users/gilles-duboscq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gilles-duboscq/subscriptions","organizations_url":"https://api.github.com/users/gilles-duboscq/orgs","repos_url":"https://api.github.com/users/gilles-duboscq/repos","events_url":"https://api.github.com/users/gilles-duboscq/events{/privacy}","received_events_url":"https://api.github.com/users/gilles-duboscq/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-27T11:58:31Z","updated_at":"2016-05-27T11:58:31Z","closed_at":null,"body":"As reported in #35 these 2 examples fail:\r\n```hocon\r\na.b.c += \"foo\"\r\n```\r\n```hocon\r\na.b.c = ${?a.b.c} [\"foo\"]\r\n```\r\n\r\n(to see the actual exceptions, this first patch is necessary:\r\n```diff\r\ndiff --git a/pyhocon/config_parser.py b/pyhocon/config_parser.py\r\nindex 9e20236..f29869c 100644\r\n--- a/pyhocon/config_parser.py\r\n+++ b/pyhocon/config_parser.py\r\n@@ -510,10 +510,10 @@ class ConfigTreeParser(TokenConverter):\r\n                 else:\r\n                     value = values[0]\r\n                     if isinstance(value, list) and operator == \"+=\":\r\n-                        value = ConfigValues([ConfigSubstitution(key, True, '', False, loc), value], False, loc)\r\n+                        value = ConfigValues([ConfigSubstitution(key, True, '', instring, loc), value], False, loc)\r\n                         config_tree.put(key, value, False)\r\n                     elif isinstance(value, str) and operator == \"+=\":\r\n-                        value = ConfigValues([ConfigSubstitution(key, True, '', True, loc), ' ' + value], True, loc)\r\n+                        value = ConfigValues([ConfigSubstitution(key, True, '', instring, loc), ' ' + value], True, loc)\r\n                         config_tree.put(key, value, False)\r\n                     elif isinstance(value, list):\r\n                         config_tree.put(key, value, False)\r\n```\r\n)"}}
{"actor":{"display_login":"gilles-duboscq"}}