{"action":"created","issue":{"url":"https://api.github.com/repos/yole/kotlin-style-guide/issues/12","repository_url":"https://api.github.com/repos/yole/kotlin-style-guide","labels_url":"https://api.github.com/repos/yole/kotlin-style-guide/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/yole/kotlin-style-guide/issues/12/comments","events_url":"https://api.github.com/repos/yole/kotlin-style-guide/issues/12/events","html_url":"https://github.com/yole/kotlin-style-guide/issues/12","id":157739771,"number":12,"title":"Using casts","user":{"login":"yole","id":46553,"avatar_url":"https://avatars.githubusercontent.com/u/46553?v=3","gravatar_id":"","url":"https://api.github.com/users/yole","html_url":"https://github.com/yole","followers_url":"https://api.github.com/users/yole/followers","following_url":"https://api.github.com/users/yole/following{/other_user}","gists_url":"https://api.github.com/users/yole/gists{/gist_id}","starred_url":"https://api.github.com/users/yole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yole/subscriptions","organizations_url":"https://api.github.com/users/yole/orgs","repos_url":"https://api.github.com/users/yole/repos","events_url":"https://api.github.com/users/yole/events{/privacy}","received_events_url":"https://api.github.com/users/yole/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-05-31T18:33:41Z","updated_at":"2016-06-08T07:37:14Z","closed_at":null,"body":"Do not use free-standing `as` expressions for smart casts. Instead, assign a new name to the variable after the cast.\r\n\r\nGood:\r\n\r\n    fun foo(x: Any) {\r\n        val s = x as String\r\n        s.length\r\n    }\r\n\r\nBad:\r\n\r\n    fun foo(x: Any) {\r\n        x as String\r\n        x.length\r\n    }"},"comment":{"url":"https://api.github.com/repos/yole/kotlin-style-guide/issues/comments/224512476","html_url":"https://github.com/yole/kotlin-style-guide/issues/12#issuecomment-224512476","issue_url":"https://api.github.com/repos/yole/kotlin-style-guide/issues/12","id":224512476,"user":{"login":"cypressious","id":1191816,"avatar_url":"https://avatars.githubusercontent.com/u/1191816?v=3","gravatar_id":"","url":"https://api.github.com/users/cypressious","html_url":"https://github.com/cypressious","followers_url":"https://api.github.com/users/cypressious/followers","following_url":"https://api.github.com/users/cypressious/following{/other_user}","gists_url":"https://api.github.com/users/cypressious/gists{/gist_id}","starred_url":"https://api.github.com/users/cypressious/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cypressious/subscriptions","organizations_url":"https://api.github.com/users/cypressious/orgs","repos_url":"https://api.github.com/users/cypressious/repos","events_url":"https://api.github.com/users/cypressious/events{/privacy}","received_events_url":"https://api.github.com/users/cypressious/received_events","type":"User","site_admin":false},"created_at":"2016-06-08T07:37:14Z","updated_at":"2016-06-08T07:37:14Z","body":"You can do `if (x !is String) return` but that's a bit more verbose."}}
{"actor":{"display_login":"cypressious"}}