{"action":"created","issue":{"url":"https://api.github.com/repos/jashkenas/coffeescript/issues/3891","labels_url":"https://api.github.com/repos/jashkenas/coffeescript/issues/3891/labels{/name}","comments_url":"https://api.github.com/repos/jashkenas/coffeescript/issues/3891/comments","events_url":"https://api.github.com/repos/jashkenas/coffeescript/issues/3891/events","html_url":"https://github.com/jashkenas/coffeescript/issues/3891","id":60133879,"number":3891,"title":"Parameter naming in 1.9.1 breaks existing code","user":{"login":"devongovett","id":19409,"avatar_url":"https://avatars.githubusercontent.com/u/19409?v=3","gravatar_id":"","url":"https://api.github.com/users/devongovett","html_url":"https://github.com/devongovett","followers_url":"https://api.github.com/users/devongovett/followers","following_url":"https://api.github.com/users/devongovett/following{/other_user}","gists_url":"https://api.github.com/users/devongovett/gists{/gist_id}","starred_url":"https://api.github.com/users/devongovett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devongovett/subscriptions","organizations_url":"https://api.github.com/users/devongovett/orgs","repos_url":"https://api.github.com/users/devongovett/repos","events_url":"https://api.github.com/users/devongovett/events{/privacy}","received_events_url":"https://api.github.com/users/devongovett/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jashkenas/coffeescript/labels/invalid","name":"invalid","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":26,"created_at":"2015-03-06T17:40:01Z","updated_at":"2015-08-17T06:29:12Z","closed_at":"2015-03-06T17:48:18Z","body":"In previous versions before 1.9.1, you could do this:\r\n\r\n```coffeescript\r\nclass Dog\r\n  constructor: (@name) ->\r\n    console.log(name)\r\n```\r\n\r\nsince `@name` and `name` were the same thing. The parameter of the function was called `name`, and was assigned to `this.name` at the start of the function.\r\n\r\nIn 1.9.1, the naming changed. The parameter is called `name1` for example, and is assigned to `@name`, so the normal `name` variable is not available and the above code will throw a reference error. This breaks existing code that relied on the old behavior where both a local variable and a property on `this` were available.\r\n\r\nI'm already getting [pull requests](https://github.com/devongovett/fontkit/pull/3) to update code to stop using the local variable that was available before. I can update all of these (if I can find them all - thank goodness for tests), but I wanted to make sure that this wasn't an unintended change, especially since it changed in a patch release."},"comment":{"url":"https://api.github.com/repos/jashkenas/coffeescript/issues/comments/131694746","html_url":"https://github.com/jashkenas/coffeescript/issues/3891#issuecomment-131694746","issue_url":"https://api.github.com/repos/jashkenas/coffeescript/issues/3891","id":131694746,"user":{"login":"lydell","id":2142817,"avatar_url":"https://avatars.githubusercontent.com/u/2142817?v=3","gravatar_id":"","url":"https://api.github.com/users/lydell","html_url":"https://github.com/lydell","followers_url":"https://api.github.com/users/lydell/followers","following_url":"https://api.github.com/users/lydell/following{/other_user}","gists_url":"https://api.github.com/users/lydell/gists{/gist_id}","starred_url":"https://api.github.com/users/lydell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lydell/subscriptions","organizations_url":"https://api.github.com/users/lydell/orgs","repos_url":"https://api.github.com/users/lydell/repos","events_url":"https://api.github.com/users/lydell/events{/privacy}","received_events_url":"https://api.github.com/users/lydell/received_events","type":"User","site_admin":false},"created_at":"2015-08-17T06:29:12Z","updated_at":"2015-08-17T06:29:12Z","body":"@pke Odd, I just tried with a fresh clone and it worked as intended for me."}}