{"action":"created","issue":{"url":"https://api.github.com/repos/apple/swift/issues/1520","repository_url":"https://api.github.com/repos/apple/swift","labels_url":"https://api.github.com/repos/apple/swift/issues/1520/labels{/name}","comments_url":"https://api.github.com/repos/apple/swift/issues/1520/comments","events_url":"https://api.github.com/repos/apple/swift/issues/1520/events","html_url":"https://github.com/apple/swift/pull/1520","id":138080590,"number":1520,"title":"[WIP][Parser][Qol] improve diagnostic with missing \"self.\" in init","user":{"login":"dduan","id":75067,"avatar_url":"https://avatars.githubusercontent.com/u/75067?v=3","gravatar_id":"","url":"https://api.github.com/users/dduan","html_url":"https://github.com/dduan","followers_url":"https://api.github.com/users/dduan/followers","following_url":"https://api.github.com/users/dduan/following{/other_user}","gists_url":"https://api.github.com/users/dduan/gists{/gist_id}","starred_url":"https://api.github.com/users/dduan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dduan/subscriptions","organizations_url":"https://api.github.com/users/dduan/orgs","repos_url":"https://api.github.com/users/dduan/repos","events_url":"https://api.github.com/users/dduan/events{/privacy}","received_events_url":"https://api.github.com/users/dduan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-03-03T05:32:39Z","updated_at":"2016-03-03T08:40:03Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apple/swift/pulls/1520","html_url":"https://github.com/apple/swift/pull/1520","diff_url":"https://github.com/apple/swift/pull/1520.diff","patch_url":"https://github.com/apple/swift/pull/1520.patch"},"body":"<!-- Please complete this template before creating pull request. -->\r\n#### What's in this pull request?\r\n<!-- Description about pull request. -->\r\nbefore:\r\n\r\n```\r\n$ cat t.swift\r\nclass A {\r\n    init(x: Int) {}\r\n\r\n    convenience init() { init(x: 1) }\r\n}\r\n\r\n$ swiftc -c t.swift\r\nt.swift:6:13: error: initializers may only be declared within a type\r\n    init(x: 1)\r\n        ^\r\nt.swift:6:17: error: expected parameter type following ':'\r\n    init(x: 1)\r\n            ^\r\nt.swift:6:17: error: expected ',' separator\r\n    init(x: 1)\r\n            ^\r\n           ,\r\nt.swift:6:17: error: expected parameter type following ':'\r\n    init(x: 1)\r\n            ^\r\nt.swift:6:17: error: expected ',' separator\r\n    init(x: 1)\r\n            ^\r\n                                                                                                                                                       ,\r\n```\r\n\r\nafter:\r\n\r\n```\r\nt.swift:6:9: error: missing 'self.' at initializer invocation\r\n    init(x: 1)\r\n    ^\r\n    self.\r\n```\r\n#### Resolved bug number: ([SR-852](https://bugs.swift.org/browse/SR-852))\r\n<!-- If this pull request resolves any bugs from Swift bug tracker -->\r\n\r\n* * * *\r\n\r\n<!-- This selection should only be completed by Swift admin -->\r\nBefore merging this pull request to apple/swift repository:\r\n- [ ] Test pull request on Swift continuous integration.\r\n\r\n<details>\r\n  <summary>Triggering Swift CI</summary>\r\n\r\nThe swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:\r\n\r\n**Smoke Testing**\r\n\r\n        Platform     | Comment\r\n        ------------ | -------------\r\n        All supported platforms     | @swift-ci Please smoke test\r\n        OS X platform               | @swift-ci Please smoke test OS X platform\r\n        Linux platform              | @swift-ci Please smoke test Linux platform\r\n\r\n **Validation Testing**\r\n\r\n        Platform     | Comment\r\n        ------------ | -------------\r\n        All supported platforms     | @swift-ci Please test\r\n        OS X platform               | @swift-ci Please test OS X platform\r\n        Linux platform              | @swift-ci Please test Linux platform\r\n\r\nNote: Only members of the Apple organization can trigger swift-ci.\r\n</details>\r\n<!-- Thank you for your contribution to Swift! -->"},"comment":{"url":"https://api.github.com/repos/apple/swift/issues/comments/191653454","html_url":"https://github.com/apple/swift/pull/1520#issuecomment-191653454","issue_url":"https://api.github.com/repos/apple/swift/issues/1520","id":191653454,"user":{"login":"tkremenek","id":3087023,"avatar_url":"https://avatars.githubusercontent.com/u/3087023?v=3","gravatar_id":"","url":"https://api.github.com/users/tkremenek","html_url":"https://github.com/tkremenek","followers_url":"https://api.github.com/users/tkremenek/followers","following_url":"https://api.github.com/users/tkremenek/following{/other_user}","gists_url":"https://api.github.com/users/tkremenek/gists{/gist_id}","starred_url":"https://api.github.com/users/tkremenek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkremenek/subscriptions","organizations_url":"https://api.github.com/users/tkremenek/orgs","repos_url":"https://api.github.com/users/tkremenek/repos","events_url":"https://api.github.com/users/tkremenek/events{/privacy}","received_events_url":"https://api.github.com/users/tkremenek/received_events","type":"User","site_admin":false},"created_at":"2016-03-03T08:40:03Z","updated_at":"2016-03-03T08:40:03Z","body":"@swift-ci please test"}}