{"issue":{"milestone":null,"user":{"id":395836,"login":"InScopeApps","url":"https://api.github.com/users/InScopeApps","avatar_url":"https://secure.gravatar.com/avatar/42c8ecd5d609b32ebb7faa644051230c?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"42c8ecd5d609b32ebb7faa644051230c"},"created_at":"2011-12-20T03:21:11Z","title":"Regression: Object Definition with Newlines","updated_at":"2011-12-20T03:34:01Z","labels":[],"state":"open","id":2608942,"html_url":"https://github.com/jashkenas/coffee-script/issues/1951","closed_at":null,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"body":"```\r\np= (p.children[c]?=\r\n    name: c\r\n    path: thisPath\r\n    attr: null\r\n    badgeClass: null\r\n    children: null\r\n    parent: p\r\n    isExpanded: expansionState[thisPath] ? false\r\n)\r\n```\r\n\r\nResults in incorrect JS:\r\n\r\n```\r\nvar p, _base, _ref, _ref2;\r\n\r\np = ((_ref = (_base = p.children)[c]) != null ? _ref : _base[c] = {\r\n  name: c\r\n}, {\r\n  path: thisPath,\r\n  attr: null,\r\n  badgeClass: null,\r\n  children: null,\r\n  parent: p,\r\n  isExpanded: (_ref2 = expansionState[thisPath]) != null ? _ref2 : false\r\n});\r\n```\r\n\r\nIn 1.1.3 the resulting JS was correct:\r\n\r\n```\r\np = ((_ref9 = (_base2 = p.children)[c]) != null ? _ref9 : _base2[c] = {\r\n    name: c,\r\n    path: thisPath,\r\n    attr: null,\r\n    badgeClass: null,\r\n    children: null,\r\n    parent: p,\r\n    isExpanded: (_ref10 = expansionState[thisPath]) != null ? _ref10 : false\r\n});\r\n```\r\n\r\n[Example](http://tinyurl.com/buahk6a)\r\n\r\nAs a work around adding the curly braces fixes the resulting JS:\r\n\r\n```\r\np= (p.children[c]?= {\r\n    name: c\r\n    path: thisPath\r\n    attr: null\r\n    badgeClass: null\r\n    children: null\r\n    parent: p\r\n    isExpanded: expansionState[thisPath] ? false\r\n})\r\n```","number":1951,"url":"https://api.github.com/repos/jashkenas/coffee-script/issues/1951","comments":1,"assignee":null},"comment":{"user":{"id":395836,"login":"InScopeApps","url":"https://api.github.com/users/InScopeApps","avatar_url":"https://secure.gravatar.com/avatar/42c8ecd5d609b32ebb7faa644051230c?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"42c8ecd5d609b32ebb7faa644051230c"},"created_at":"2011-12-20T03:34:01Z","updated_at":"2011-12-20T03:34:01Z","id":3213971,"body":"After further digging the problem is the `?`. Without it the resulting JS is fine:\r\n\r\n```\r\np = (p.children[c] = {\r\n  name: c,\r\n  path: thisPath,\r\n  attr: null,\r\n  badgeClass: null,\r\n  children: null,\r\n  parent: p,\r\n  isExpanded: (_ref = expansionState[thisPath]) != null ? _ref : false\r\n});\r\n```","url":"https://api.github.com/repos/jashkenas/coffee-script/issues/comments/3213971"},"action":"created"}