{"action":"created","comment":{"url":"https://api.github.com/repos/apple/swift/pulls/comments/209409655","pull_request_review_id":145428503,"id":209409655,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwOTQwOTY1NQ==","diff_hunk":"@@ -3571,7 +3571,7 @@ class InputMatcher {\n /// that needs to be unwrapped.\n ///\n /// \\returns true if a diagnostic was produced.\n-bool diagnoseUnwrap(TypeChecker &TC, DeclContext *DC, Expr *expr, Type type);\n+bool diagnoseUnwrap(constraints::ConstraintSystem &CS, Expr *expr, Type type);","path":"lib/Sema/ConstraintSystem.h","position":5,"original_position":5,"commit_id":"00d7cc6f69b977307b9125ef114782c7297591ae","original_commit_id":"00d7cc6f69b977307b9125ef114782c7297591ae","user":{"login":"slavapestov","id":66486,"node_id":"MDQ6VXNlcjY2NDg2","avatar_url":"https://avatars1.githubusercontent.com/u/66486?v=4","gravatar_id":"","url":"https://api.github.com/users/slavapestov","html_url":"https://github.com/slavapestov","followers_url":"https://api.github.com/users/slavapestov/followers","following_url":"https://api.github.com/users/slavapestov/following{/other_user}","gists_url":"https://api.github.com/users/slavapestov/gists{/gist_id}","starred_url":"https://api.github.com/users/slavapestov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slavapestov/subscriptions","organizations_url":"https://api.github.com/users/slavapestov/orgs","repos_url":"https://api.github.com/users/slavapestov/repos","events_url":"https://api.github.com/users/slavapestov/events{/privacy}","received_events_url":"https://api.github.com/users/slavapestov/received_events","type":"User","site_admin":false},"body":"Put this in CSDiagnostics.h","created_at":"2018-08-11T00:17:25Z","updated_at":"2018-08-11T00:17:25Z","html_url":"https://github.com/apple/swift/pull/18324#discussion_r209409655","pull_request_url":"https://api.github.com/repos/apple/swift/pulls/18324","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/apple/swift/pulls/comments/209409655"},"html":{"href":"https://github.com/apple/swift/pull/18324#discussion_r209409655"},"pull_request":{"href":"https://api.github.com/repos/apple/swift/pulls/18324"}}},"pull_request":{"url":"https://api.github.com/repos/apple/swift/pulls/18324","id":204579936,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0NTc5OTM2","html_url":"https://github.com/apple/swift/pull/18324","diff_url":"https://github.com/apple/swift/pull/18324.diff","patch_url":"https://github.com/apple/swift/pull/18324.patch","issue_url":"https://api.github.com/repos/apple/swift/issues/18324","number":18324,"state":"open","locked":false,"title":"[Sema] More unwrap fixits","user":{"login":"gregomni","id":15795449,"node_id":"MDQ6VXNlcjE1Nzk1NDQ5","avatar_url":"https://avatars3.githubusercontent.com/u/15795449?v=4","gravatar_id":"","url":"https://api.github.com/users/gregomni","html_url":"https://github.com/gregomni","followers_url":"https://api.github.com/users/gregomni/followers","following_url":"https://api.github.com/users/gregomni/following{/other_user}","gists_url":"https://api.github.com/users/gregomni/gists{/gist_id}","starred_url":"https://api.github.com/users/gregomni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregomni/subscriptions","organizations_url":"https://api.github.com/users/gregomni/orgs","repos_url":"https://api.github.com/users/gregomni/repos","events_url":"https://api.github.com/users/gregomni/events{/privacy}","received_events_url":"https://api.github.com/users/gregomni/received_events","type":"User","site_admin":false},"body":"When we diagnose an unwrap, if the expression being unwrapped is a sole reference to a local let/var, and the local's type is inferred, offer fixits on the initializer as well. In this position we can also reasonably offer 'guard let'.\r\n\r\n","created_at":"2018-07-28T06:41:24Z","updated_at":"2018-08-11T00:17:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6de34ce07bb4125870c33a2a60b05e8ee29e01d3","assignee":null,"assignees":[],"requested_reviewers":[{"login":"rudkx","id":162784,"node_id":"MDQ6VXNlcjE2Mjc4NA==","avatar_url":"https://avatars1.githubusercontent.com/u/162784?v=4","gravatar_id":"","url":"https://api.github.com/users/rudkx","html_url":"https://github.com/rudkx","followers_url":"https://api.github.com/users/rudkx/followers","following_url":"https://api.github.com/users/rudkx/following{/other_user}","gists_url":"https://api.github.com/users/rudkx/gists{/gist_id}","starred_url":"https://api.github.com/users/rudkx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rudkx/subscriptions","organizations_url":"https://api.github.com/users/rudkx/orgs","repos_url":"https://api.github.com/users/rudkx/repos","events_url":"https://api.github.com/users/rudkx/events{/privacy}","received_events_url":"https://api.github.com/users/rudkx/received_events","type":"User","site_admin":false},{"login":"DougGregor","id":989428,"node_id":"MDQ6VXNlcjk4OTQyOA==","avatar_url":"https://avatars3.githubusercontent.com/u/989428?v=4","gravatar_id":"","url":"https://api.github.com/users/DougGregor","html_url":"https://github.com/DougGregor","followers_url":"https://api.github.com/users/DougGregor/followers","following_url":"https://api.github.com/users/DougGregor/following{/other_user}","gists_url":"https://api.github.com/users/DougGregor/gists{/gist_id}","starred_url":"https://api.github.com/users/DougGregor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DougGregor/subscriptions","organizations_url":"https://api.github.com/users/DougGregor/orgs","repos_url":"https://api.github.com/users/DougGregor/repos","events_url":"https://api.github.com/users/DougGregor/events{/privacy}","received_events_url":"https://api.github.com/users/DougGregor/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apple/swift/pulls/18324/commits","review_comments_url":"https://api.github.com/repos/apple/swift/pulls/18324/comments","review_comment_url":"https://api.github.com/repos/apple/swift/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apple/swift/issues/18324/comments","statuses_url":"https://api.github.com/repos/apple/swift/statuses/00d7cc6f69b977307b9125ef114782c7297591ae","head":{"label":"gregomni:opty2","ref":"opty2","sha":"00d7cc6f69b977307b9125ef114782c7297591ae","user":{"login":"gregomni","id":15795449,"node_id":"MDQ6VXNlcjE1Nzk1NDQ5","avatar_url":"https://avatars3.githubusercontent.com/u/15795449?v=4","gravatar_id":"","url":"https://api.github.com/users/gregomni","html_url":"https://github.com/gregomni","followers_url":"https://api.github.com/users/gregomni/followers","following_url":"https://api.github.com/users/gregomni/following{/other_user}","gists_url":"https://api.github.com/users/gregomni/gists{/gist_id}","starred_url":"https://api.github.com/users/gregomni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregomni/subscriptions","organizations_url":"https://api.github.com/users/gregomni/orgs","repos_url":"https://api.github.com/users/gregomni/repos","events_url":"https://api.github.com/users/gregomni/events{/privacy}","received_events_url":"https://api.github.com/users/gregomni/received_events","type":"User","site_admin":false},"repo":{"id":47734038,"node_id":"MDEwOlJlcG9zaXRvcnk0NzczNDAzOA==","name":"swift","full_name":"gregomni/swift","owner":{"login":"gregomni","id":15795449,"node_id":"MDQ6VXNlcjE1Nzk1NDQ5","avatar_url":"https://avatars3.githubusercontent.com/u/15795449?v=4","gravatar_id":"","url":"https://api.github.com/users/gregomni","html_url":"https://github.com/gregomni","followers_url":"https://api.github.com/users/gregomni/followers","following_url":"https://api.github.com/users/gregomni/following{/other_user}","gists_url":"https://api.github.com/users/gregomni/gists{/gist_id}","starred_url":"https://api.github.com/users/gregomni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregomni/subscriptions","organizations_url":"https://api.github.com/users/gregomni/orgs","repos_url":"https://api.github.com/users/gregomni/repos","events_url":"https://api.github.com/users/gregomni/events{/privacy}","received_events_url":"https://api.github.com/users/gregomni/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gregomni/swift","description":"The Swift Programming Language","fork":true,"url":"https://api.github.com/repos/gregomni/swift","forks_url":"https://api.github.com/repos/gregomni/swift/forks","keys_url":"https://api.github.com/repos/gregomni/swift/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gregomni/swift/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gregomni/swift/teams","hooks_url":"https://api.github.com/repos/gregomni/swift/hooks","issue_events_url":"https://api.github.com/repos/gregomni/swift/issues/events{/number}","events_url":"https://api.github.com/repos/gregomni/swift/events","assignees_url":"https://api.github.com/repos/gregomni/swift/assignees{/user}","branches_url":"https://api.github.com/repos/gregomni/swift/branches{/branch}","tags_url":"https://api.github.com/repos/gregomni/swift/tags","blobs_url":"https://api.github.com/repos/gregomni/swift/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gregomni/swift/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gregomni/swift/git/refs{/sha}","trees_url":"https://api.github.com/repos/gregomni/swift/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gregomni/swift/statuses/{sha}","languages_url":"https://api.github.com/repos/gregomni/swift/languages","stargazers_url":"https://api.github.com/repos/gregomni/swift/stargazers","contributors_url":"https://api.github.com/repos/gregomni/swift/contributors","subscribers_url":"https://api.github.com/repos/gregomni/swift/subscribers","subscription_url":"https://api.github.com/repos/gregomni/swift/subscription","commits_url":"https://api.github.com/repos/gregomni/swift/commits{/sha}","git_commits_url":"https://api.github.com/repos/gregomni/swift/git/commits{/sha}","comments_url":"https://api.github.com/repos/gregomni/swift/comments{/number}","issue_comment_url":"https://api.github.com/repos/gregomni/swift/issues/comments{/number}","contents_url":"https://api.github.com/repos/gregomni/swift/contents/{+path}","compare_url":"https://api.github.com/repos/gregomni/swift/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gregomni/swift/merges","archive_url":"https://api.github.com/repos/gregomni/swift/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gregomni/swift/downloads","issues_url":"https://api.github.com/repos/gregomni/swift/issues{/number}","pulls_url":"https://api.github.com/repos/gregomni/swift/pulls{/number}","milestones_url":"https://api.github.com/repos/gregomni/swift/milestones{/number}","notifications_url":"https://api.github.com/repos/gregomni/swift/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gregomni/swift/labels{/name}","releases_url":"https://api.github.com/repos/gregomni/swift/releases{/id}","deployments_url":"https://api.github.com/repos/gregomni/swift/deployments","created_at":"2015-12-10T02:58:32Z","updated_at":"2018-08-08T23:59:03Z","pushed_at":"2018-08-10T14:54:28Z","git_url":"git://github.com/gregomni/swift.git","ssh_url":"git@github.com:gregomni/swift.git","clone_url":"https://github.com/gregomni/swift.git","svn_url":"https://github.com/gregomni/swift","homepage":"","size":296391,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apple:master","ref":"master","sha":"e68e0874629e2a451a8b8e3f978ed8ac1cebaf20","user":{"login":"apple","id":10639145,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwNjM5MTQ1","avatar_url":"https://avatars0.githubusercontent.com/u/10639145?v=4","gravatar_id":"","url":"https://api.github.com/users/apple","html_url":"https://github.com/apple","followers_url":"https://api.github.com/users/apple/followers","following_url":"https://api.github.com/users/apple/following{/other_user}","gists_url":"https://api.github.com/users/apple/gists{/gist_id}","starred_url":"https://api.github.com/users/apple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apple/subscriptions","organizations_url":"https://api.github.com/users/apple/orgs","repos_url":"https://api.github.com/users/apple/repos","events_url":"https://api.github.com/users/apple/events{/privacy}","received_events_url":"https://api.github.com/users/apple/received_events","type":"Organization","site_admin":false},"repo":{"id":44838949,"node_id":"MDEwOlJlcG9zaXRvcnk0NDgzODk0OQ==","name":"swift","full_name":"apple/swift","owner":{"login":"apple","id":10639145,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwNjM5MTQ1","avatar_url":"https://avatars0.githubusercontent.com/u/10639145?v=4","gravatar_id":"","url":"https://api.github.com/users/apple","html_url":"https://github.com/apple","followers_url":"https://api.github.com/users/apple/followers","following_url":"https://api.github.com/users/apple/following{/other_user}","gists_url":"https://api.github.com/users/apple/gists{/gist_id}","starred_url":"https://api.github.com/users/apple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apple/subscriptions","organizations_url":"https://api.github.com/users/apple/orgs","repos_url":"https://api.github.com/users/apple/repos","events_url":"https://api.github.com/users/apple/events{/privacy}","received_events_url":"https://api.github.com/users/apple/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apple/swift","description":"The Swift Programming Language","fork":false,"url":"https://api.github.com/repos/apple/swift","forks_url":"https://api.github.com/repos/apple/swift/forks","keys_url":"https://api.github.com/repos/apple/swift/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apple/swift/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apple/swift/teams","hooks_url":"https://api.github.com/repos/apple/swift/hooks","issue_events_url":"https://api.github.com/repos/apple/swift/issues/events{/number}","events_url":"https://api.github.com/repos/apple/swift/events","assignees_url":"https://api.github.com/repos/apple/swift/assignees{/user}","branches_url":"https://api.github.com/repos/apple/swift/branches{/branch}","tags_url":"https://api.github.com/repos/apple/swift/tags","blobs_url":"https://api.github.com/repos/apple/swift/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apple/swift/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apple/swift/git/refs{/sha}","trees_url":"https://api.github.com/repos/apple/swift/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apple/swift/statuses/{sha}","languages_url":"https://api.github.com/repos/apple/swift/languages","stargazers_url":"https://api.github.com/repos/apple/swift/stargazers","contributors_url":"https://api.github.com/repos/apple/swift/contributors","subscribers_url":"https://api.github.com/repos/apple/swift/subscribers","subscription_url":"https://api.github.com/repos/apple/swift/subscription","commits_url":"https://api.github.com/repos/apple/swift/commits{/sha}","git_commits_url":"https://api.github.com/repos/apple/swift/git/commits{/sha}","comments_url":"https://api.github.com/repos/apple/swift/comments{/number}","issue_comment_url":"https://api.github.com/repos/apple/swift/issues/comments{/number}","contents_url":"https://api.github.com/repos/apple/swift/contents/{+path}","compare_url":"https://api.github.com/repos/apple/swift/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apple/swift/merges","archive_url":"https://api.github.com/repos/apple/swift/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apple/swift/downloads","issues_url":"https://api.github.com/repos/apple/swift/issues{/number}","pulls_url":"https://api.github.com/repos/apple/swift/pulls{/number}","milestones_url":"https://api.github.com/repos/apple/swift/milestones{/number}","notifications_url":"https://api.github.com/repos/apple/swift/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apple/swift/labels{/name}","releases_url":"https://api.github.com/repos/apple/swift/releases{/id}","deployments_url":"https://api.github.com/repos/apple/swift/deployments","created_at":"2015-10-23T21:15:07Z","updated_at":"2018-08-11T00:11:49Z","pushed_at":"2018-08-11T00:10:29Z","git_url":"git://github.com/apple/swift.git","ssh_url":"git@github.com:apple/swift.git","clone_url":"https://github.com/apple/swift.git","svn_url":"https://github.com/apple/swift","homepage":"https://swift.org/","size":324218,"stargazers_count":44813,"watchers_count":44813,"language":"C++","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":7068,"mirror_url":null,"archived":false,"open_issues_count":373,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":7068,"open_issues":373,"watchers":44813,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apple/swift/pulls/18324"},"html":{"href":"https://github.com/apple/swift/pull/18324"},"issue":{"href":"https://api.github.com/repos/apple/swift/issues/18324"},"comments":{"href":"https://api.github.com/repos/apple/swift/issues/18324/comments"},"review_comments":{"href":"https://api.github.com/repos/apple/swift/pulls/18324/comments"},"review_comment":{"href":"https://api.github.com/repos/apple/swift/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apple/swift/pulls/18324/commits"},"statuses":{"href":"https://api.github.com/repos/apple/swift/statuses/00d7cc6f69b977307b9125ef114782c7297591ae"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"slavapestov"}}