{"action":"closed","issue":{"url":"https://api.github.com/repos/jesserayadkins/lily/issues/258","repository_url":"https://api.github.com/repos/jesserayadkins/lily","labels_url":"https://api.github.com/repos/jesserayadkins/lily/issues/258/labels{/name}","comments_url":"https://api.github.com/repos/jesserayadkins/lily/issues/258/comments","events_url":"https://api.github.com/repos/jesserayadkins/lily/issues/258/events","html_url":"https://github.com/jesserayadkins/lily/issues/258","id":165607724,"number":258,"title":"Hint about possibly-omitted \"var\" keyword for assignments to unknown properties?","user":{"login":"a-p-","id":4145331,"avatar_url":"https://avatars.githubusercontent.com/u/4145331?v=3","gravatar_id":"","url":"https://api.github.com/users/a-p-","html_url":"https://github.com/a-p-","followers_url":"https://api.github.com/users/a-p-/followers","following_url":"https://api.github.com/users/a-p-/following{/other_user}","gists_url":"https://api.github.com/users/a-p-/gists{/gist_id}","starred_url":"https://api.github.com/users/a-p-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a-p-/subscriptions","organizations_url":"https://api.github.com/users/a-p-/orgs","repos_url":"https://api.github.com/users/a-p-/repos","events_url":"https://api.github.com/users/a-p-/events{/privacy}","received_events_url":"https://api.github.com/users/a-p-/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-14T16:48:38Z","updated_at":"2016-07-15T00:09:53Z","closed_at":"2016-07-15T00:09:53Z","body":"I've found myself accidentally writing code like this on several occasions:\r\n\r\n    class Test(xyz: Integer)\r\n    {\r\n            @xyz = xyz\r\n    }\r\n\r\nwhere the `var` keyword is accidentally omitted before the `@xyz = xyz` assignment.\r\n\r\nLily (4973a917612c85f24be2f852af2f75f0f2722cad) gives an error like:\r\n\r\n    $ ../lily var.lly \r\n    SyntaxError: Property xyz is not in class Test.\r\n        from var.lly:3\r\n    $ \r\n\r\nI find that it isn't immediately obvious that it's the missing \"var\" keyword that's causing the error.\r\n\r\nFor assignments to an unknown property like that, maybe the error message could hint that the \"var\" keyword may be missing, perhaps something like:\r\n\r\n    SyntaxError: Property xyz is not in class Test. ('var' keyword may be missing.)\r\n"}}
{"actor":{"display_login":"jesserayadkins"}}