{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/205858237","pull_request_review_id":141217457,"id":205858237,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNTg1ODIzNw==","diff_hunk":"@@ -538,16 +538,47 @@ private static bool IsTypeLessVisibleThan(TypeSymbol type, Symbol sym, ref HashS\n         /// traversal stops and that type is returned from this method. Otherwise if traversal\n         /// completes without the predicate returning true for any type, this method returns null.\n         /// </summary>\n-        public static TypeSymbol VisitType<T>(this TypeSymbol type, Func<TypeSymbol, T, bool, bool> predicate, T arg, bool canDigThroughNullable =  false)\n+        public static TypeSymbol VisitType<T>(\n+            this TypeSymbol type,\n+            Func<TypeSymbol, T, bool, bool> predicate,\n+            T arg,\n+            bool canDigThroughNullable = false)\n+        {\n+            return VisitType(\n+                typeWithAnnotationsOpt: null,\n+                typeOpt: type,\n+                typeWithAnnotationsPredicateOpt: null,\n+                typePredicateOpt: predicate,\n+                arg,\n+                canDigThroughNullable);\n+        }\n+\n+        /// <summary>\n+        /// Visit the given type and, in the case of compound types, visit all \"sub type\".\n+        /// One of the predicates will be invoked at each type. If the type is a\n+        /// TypeSymbolWithAnnotations, <paramref name=\"typeWithAnnotationsPredicateOpt\"/>\n+        /// will be invoked; otherwise <paramref name=\"typePredicateOpt\"/> will be invoked.\n+        /// If the corresponding predicate returns true for any type,\n+        /// traversal stops and that type is returned from this method. Otherwise if traversal\n+        /// completes without the predicate returning true for any type, this method returns null.\n+        /// </summary>\n+        public static TypeSymbol VisitType<T>(","path":"src/Compilers/CSharp/Portable/Symbols/TypeSymbolExtensions.cs","position":29,"original_position":29,"commit_id":"8b39edd50a835bd1d629ccecdbfad469b6d9e899","original_commit_id":"8b39edd50a835bd1d629ccecdbfad469b6d9e899","user":{"login":"cston","id":10732005,"node_id":"MDQ6VXNlcjEwNzMyMDA1","avatar_url":"https://avatars2.githubusercontent.com/u/10732005?v=4","gravatar_id":"","url":"https://api.github.com/users/cston","html_url":"https://github.com/cston","followers_url":"https://api.github.com/users/cston/followers","following_url":"https://api.github.com/users/cston/following{/other_user}","gists_url":"https://api.github.com/users/cston/gists{/gist_id}","starred_url":"https://api.github.com/users/cston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cston/subscriptions","organizations_url":"https://api.github.com/users/cston/orgs","repos_url":"https://api.github.com/users/cston/repos","events_url":"https://api.github.com/users/cston/events{/privacy}","received_events_url":"https://api.github.com/users/cston/received_events","type":"User","site_admin":false},"body":"I agree, it's strange to have two mutually exclusive parameters. But it does allow writing specific helper methods that encapsulate the call to `VisitType` but that also take either a `TypeSymbol` or a `TypeSymbolWithAnnotations` (see `TypeSymbolWithAnnotations.ContainsNullableReferenceTypes for instance).\r\n\r\n---\r\nIn reply to: [205853384](https://github.com/dotnet/roslyn/pull/28804#discussion_r205853384) [](ancestors = 205853384)","created_at":"2018-07-27T18:15:42Z","updated_at":"2018-07-27T18:15:42Z","html_url":"https://github.com/dotnet/roslyn/pull/28804#discussion_r205858237","pull_request_url":"https://api.github.com/repos/dotnet/roslyn/pulls/28804","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/205858237"},"html":{"href":"https://github.com/dotnet/roslyn/pull/28804#discussion_r205858237"},"pull_request":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/28804"}},"in_reply_to_id":205834509},"pull_request":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/28804","id":203412073,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzNDEyMDcz","html_url":"https://github.com/dotnet/roslyn/pull/28804","diff_url":"https://github.com/dotnet/roslyn/pull/28804.diff","patch_url":"https://github.com/dotnet/roslyn/pull/28804.patch","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/28804","number":28804,"state":"open","locked":false,"title":"Report error for T? when T is unconstrained","user":{"login":"cston","id":10732005,"node_id":"MDQ6VXNlcjEwNzMyMDA1","avatar_url":"https://avatars2.githubusercontent.com/u/10732005?v=4","gravatar_id":"","url":"https://api.github.com/users/cston","html_url":"https://github.com/cston","followers_url":"https://api.github.com/users/cston/followers","following_url":"https://api.github.com/users/cston/following{/other_user}","gists_url":"https://api.github.com/users/cston/gists{/gist_id}","starred_url":"https://api.github.com/users/cston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cston/subscriptions","organizations_url":"https://api.github.com/users/cston/orgs","repos_url":"https://api.github.com/users/cston/repos","events_url":"https://api.github.com/users/cston/events{/privacy}","received_events_url":"https://api.github.com/users/cston/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-07-24T05:16:10Z","updated_at":"2018-07-27T18:15:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4a05200b8a019f2dfa8ce515e8b3a971b92b92eb","assignee":{"login":"jcouv","id":12466233,"node_id":"MDQ6VXNlcjEyNDY2MjMz","avatar_url":"https://avatars2.githubusercontent.com/u/12466233?v=4","gravatar_id":"","url":"https://api.github.com/users/jcouv","html_url":"https://github.com/jcouv","followers_url":"https://api.github.com/users/jcouv/followers","following_url":"https://api.github.com/users/jcouv/following{/other_user}","gists_url":"https://api.github.com/users/jcouv/gists{/gist_id}","starred_url":"https://api.github.com/users/jcouv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcouv/subscriptions","organizations_url":"https://api.github.com/users/jcouv/orgs","repos_url":"https://api.github.com/users/jcouv/repos","events_url":"https://api.github.com/users/jcouv/events{/privacy}","received_events_url":"https://api.github.com/users/jcouv/received_events","type":"User","site_admin":false},"assignees":[{"login":"jcouv","id":12466233,"node_id":"MDQ6VXNlcjEyNDY2MjMz","avatar_url":"https://avatars2.githubusercontent.com/u/12466233?v=4","gravatar_id":"","url":"https://api.github.com/users/jcouv","html_url":"https://github.com/jcouv","followers_url":"https://api.github.com/users/jcouv/followers","following_url":"https://api.github.com/users/jcouv/following{/other_user}","gists_url":"https://api.github.com/users/jcouv/gists{/gist_id}","starred_url":"https://api.github.com/users/jcouv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcouv/subscriptions","organizations_url":"https://api.github.com/users/jcouv/orgs","repos_url":"https://api.github.com/users/jcouv/repos","events_url":"https://api.github.com/users/jcouv/events{/privacy}","received_events_url":"https://api.github.com/users/jcouv/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":166673288,"node_id":"MDU6TGFiZWwxNjY2NzMyODg=","url":"https://api.github.com/repos/dotnet/roslyn/labels/Area-Compilers","name":"Area-Compilers","color":"5319e7","default":false},{"id":344899605,"node_id":"MDU6TGFiZWwzNDQ4OTk2MDU=","url":"https://api.github.com/repos/dotnet/roslyn/labels/New%20Language%20Feature%20-%20Nullable%20Reference%20Types","name":"New Language Feature - Nullable Reference Types","color":"bfd4f2","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/roslyn/pulls/28804/commits","review_comments_url":"https://api.github.com/repos/dotnet/roslyn/pulls/28804/comments","review_comment_url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/28804/comments","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/8b39edd50a835bd1d629ccecdbfad469b6d9e899","head":{"label":"cston:nullable-t","ref":"nullable-t","sha":"8b39edd50a835bd1d629ccecdbfad469b6d9e899","user":{"login":"cston","id":10732005,"node_id":"MDQ6VXNlcjEwNzMyMDA1","avatar_url":"https://avatars2.githubusercontent.com/u/10732005?v=4","gravatar_id":"","url":"https://api.github.com/users/cston","html_url":"https://github.com/cston","followers_url":"https://api.github.com/users/cston/followers","following_url":"https://api.github.com/users/cston/following{/other_user}","gists_url":"https://api.github.com/users/cston/gists{/gist_id}","starred_url":"https://api.github.com/users/cston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cston/subscriptions","organizations_url":"https://api.github.com/users/cston/orgs","repos_url":"https://api.github.com/users/cston/repos","events_url":"https://api.github.com/users/cston/events{/privacy}","received_events_url":"https://api.github.com/users/cston/received_events","type":"User","site_admin":false},"repo":{"id":30556803,"node_id":"MDEwOlJlcG9zaXRvcnkzMDU1NjgwMw==","name":"roslyn","full_name":"cston/roslyn","owner":{"login":"cston","id":10732005,"node_id":"MDQ6VXNlcjEwNzMyMDA1","avatar_url":"https://avatars2.githubusercontent.com/u/10732005?v=4","gravatar_id":"","url":"https://api.github.com/users/cston","html_url":"https://github.com/cston","followers_url":"https://api.github.com/users/cston/followers","following_url":"https://api.github.com/users/cston/following{/other_user}","gists_url":"https://api.github.com/users/cston/gists{/gist_id}","starred_url":"https://api.github.com/users/cston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cston/subscriptions","organizations_url":"https://api.github.com/users/cston/orgs","repos_url":"https://api.github.com/users/cston/repos","events_url":"https://api.github.com/users/cston/events{/privacy}","received_events_url":"https://api.github.com/users/cston/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cston/roslyn","description":"The .NET Compiler Platform (\"Roslyn\") provides open-source C# and Visual Basic compilers with rich code analysis APIs.","fork":true,"url":"https://api.github.com/repos/cston/roslyn","forks_url":"https://api.github.com/repos/cston/roslyn/forks","keys_url":"https://api.github.com/repos/cston/roslyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cston/roslyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cston/roslyn/teams","hooks_url":"https://api.github.com/repos/cston/roslyn/hooks","issue_events_url":"https://api.github.com/repos/cston/roslyn/issues/events{/number}","events_url":"https://api.github.com/repos/cston/roslyn/events","assignees_url":"https://api.github.com/repos/cston/roslyn/assignees{/user}","branches_url":"https://api.github.com/repos/cston/roslyn/branches{/branch}","tags_url":"https://api.github.com/repos/cston/roslyn/tags","blobs_url":"https://api.github.com/repos/cston/roslyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cston/roslyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cston/roslyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/cston/roslyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cston/roslyn/statuses/{sha}","languages_url":"https://api.github.com/repos/cston/roslyn/languages","stargazers_url":"https://api.github.com/repos/cston/roslyn/stargazers","contributors_url":"https://api.github.com/repos/cston/roslyn/contributors","subscribers_url":"https://api.github.com/repos/cston/roslyn/subscribers","subscription_url":"https://api.github.com/repos/cston/roslyn/subscription","commits_url":"https://api.github.com/repos/cston/roslyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/cston/roslyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/cston/roslyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/cston/roslyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/cston/roslyn/contents/{+path}","compare_url":"https://api.github.com/repos/cston/roslyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cston/roslyn/merges","archive_url":"https://api.github.com/repos/cston/roslyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cston/roslyn/downloads","issues_url":"https://api.github.com/repos/cston/roslyn/issues{/number}","pulls_url":"https://api.github.com/repos/cston/roslyn/pulls{/number}","milestones_url":"https://api.github.com/repos/cston/roslyn/milestones{/number}","notifications_url":"https://api.github.com/repos/cston/roslyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cston/roslyn/labels{/name}","releases_url":"https://api.github.com/repos/cston/roslyn/releases{/id}","deployments_url":"https://api.github.com/repos/cston/roslyn/deployments","created_at":"2015-02-09T20:26:55Z","updated_at":"2018-07-05T20:02:55Z","pushed_at":"2018-07-27T15:29:37Z","git_url":"git://github.com/cston/roslyn.git","ssh_url":"git@github.com:cston/roslyn.git","clone_url":"https://github.com/cston/roslyn.git","svn_url":"https://github.com/cston/roslyn","homepage":"","size":362242,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"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":"dotnet:features/NullableReferenceTypes","ref":"features/NullableReferenceTypes","sha":"2edaf017338216d3d71b28dedb421824387d0d3b","user":{"login":"dotnet","id":9141961,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkxNDE5NjE=","avatar_url":"https://avatars0.githubusercontent.com/u/9141961?v=4","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":29078997,"node_id":"MDEwOlJlcG9zaXRvcnkyOTA3ODk5Nw==","name":"roslyn","full_name":"dotnet/roslyn","owner":{"login":"dotnet","id":9141961,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkxNDE5NjE=","avatar_url":"https://avatars0.githubusercontent.com/u/9141961?v=4","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/roslyn","description":"The .NET Compiler Platform (\"Roslyn\") provides open-source C# and Visual Basic compilers with rich code analysis APIs.","fork":false,"url":"https://api.github.com/repos/dotnet/roslyn","forks_url":"https://api.github.com/repos/dotnet/roslyn/forks","keys_url":"https://api.github.com/repos/dotnet/roslyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/roslyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/roslyn/teams","hooks_url":"https://api.github.com/repos/dotnet/roslyn/hooks","issue_events_url":"https://api.github.com/repos/dotnet/roslyn/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/roslyn/events","assignees_url":"https://api.github.com/repos/dotnet/roslyn/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/roslyn/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/roslyn/tags","blobs_url":"https://api.github.com/repos/dotnet/roslyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/roslyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/roslyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/roslyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/roslyn/languages","stargazers_url":"https://api.github.com/repos/dotnet/roslyn/stargazers","contributors_url":"https://api.github.com/repos/dotnet/roslyn/contributors","subscribers_url":"https://api.github.com/repos/dotnet/roslyn/subscribers","subscription_url":"https://api.github.com/repos/dotnet/roslyn/subscription","commits_url":"https://api.github.com/repos/dotnet/roslyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/roslyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/roslyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/roslyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/roslyn/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/roslyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/roslyn/merges","archive_url":"https://api.github.com/repos/dotnet/roslyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/roslyn/downloads","issues_url":"https://api.github.com/repos/dotnet/roslyn/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/roslyn/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/roslyn/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/roslyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/roslyn/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/roslyn/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/roslyn/deployments","created_at":"2015-01-11T02:39:03Z","updated_at":"2018-07-27T18:04:26Z","pushed_at":"2018-07-27T18:04:03Z","git_url":"git://github.com/dotnet/roslyn.git","ssh_url":"git@github.com:dotnet/roslyn.git","clone_url":"https://github.com/dotnet/roslyn.git","svn_url":"https://github.com/dotnet/roslyn","homepage":"","size":418003,"stargazers_count":9632,"watchers_count":9632,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2291,"mirror_url":null,"archived":false,"open_issues_count":4949,"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":2291,"open_issues":4949,"watchers":9632,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/28804"},"html":{"href":"https://github.com/dotnet/roslyn/pull/28804"},"issue":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/28804"},"comments":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/28804/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/28804/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/28804/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/roslyn/statuses/8b39edd50a835bd1d629ccecdbfad469b6d9e899"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"cston"}}