{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/36560507","id":36560507,"diff_hunk":"@@ -135,9 +136,26 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Recommendations\n \n             ' Hide backing fields and events\n \n+            ' GitHub #4208: When the user is typing a predicate (eg. \"Enumerable.Range(0,10).Select($$\")\n+            ' we should filter out all the Func(Of delegate types, because they interfer with typing \"Function\".\n+            Dim typeInferrer = context.GetLanguageService(Of ITypeInferenceService)()\n+            Dim inferredTypes = typeInferrer.InferTypes(context.SemanticModel, context.Position, cancellationToken:=cancellationToken)\n+            If inferredTypes?.Any(Function(t) t IsNot Nothing AndAlso IsFunc(t.OriginalDefinition)) Then\n+                symbols = symbols.Where(Function(s) Not IsFunc(TryCast(s, ITypeSymbol)))\n+            End If\n+\n             Return symbols.Where(Function(s) FilterEventsAndGeneratedSymbols(Nothing, s))\n         End Function\n \n+        Private Function IsFunc(t As ITypeSymbol) As Boolean\n+            Return t IsNot Nothing AndAlso\n+                    t.Name = \"Func\" AndAlso\n+                    t.GetArity() > 0 AndAlso\n+                    t.ContainingNamespace IsNot Nothing AndAlso\n+                    t.ContainingNamespace.Name = \"System\"","path":"src/Workspaces/VisualBasic/Portable/Recommendations/VisualBasicRecommendationService.vb","position":28,"original_position":28,"commit_id":"36784e73e2763d184d1ea70f1a0779a75d0c8427","original_commit_id":"36784e73e2763d184d1ea70f1a0779a75d0c8427","user":{"login":"jasonmalinowski","id":201340,"avatar_url":"https://avatars.githubusercontent.com/u/201340?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonmalinowski","html_url":"https://github.com/jasonmalinowski","followers_url":"https://api.github.com/users/jasonmalinowski/followers","following_url":"https://api.github.com/users/jasonmalinowski/following{/other_user}","gists_url":"https://api.github.com/users/jasonmalinowski/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonmalinowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonmalinowski/subscriptions","organizations_url":"https://api.github.com/users/jasonmalinowski/orgs","repos_url":"https://api.github.com/users/jasonmalinowski/repos","events_url":"https://api.github.com/users/jasonmalinowski/events{/privacy}","received_events_url":"https://api.github.com/users/jasonmalinowski/received_events","type":"User","site_admin":false},"body":"Library.System.Func, what do you want to do about that?","created_at":"2015-08-07T20:56:40Z","updated_at":"2015-08-07T20:56:40Z","html_url":"https://github.com/dotnet/roslyn/pull/4428#discussion_r36560507","pull_request_url":"https://api.github.com/repos/dotnet/roslyn/pulls/4428","_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/36560507"},"html":{"href":"https://github.com/dotnet/roslyn/pull/4428#discussion_r36560507"},"pull_request":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/4428"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/4428","id":41932226,"html_url":"https://github.com/dotnet/roslyn/pull/4428","diff_url":"https://github.com/dotnet/roslyn/pull/4428.diff","patch_url":"https://github.com/dotnet/roslyn/pull/4428.patch","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/4428","number":4428,"state":"open","locked":false,"title":"Exclude System.Func from the completion list when the user is likely …","user":{"login":"rchande","id":3751401,"avatar_url":"https://avatars.githubusercontent.com/u/3751401?v=3","gravatar_id":"","url":"https://api.github.com/users/rchande","html_url":"https://github.com/rchande","followers_url":"https://api.github.com/users/rchande/followers","following_url":"https://api.github.com/users/rchande/following{/other_user}","gists_url":"https://api.github.com/users/rchande/gists{/gist_id}","starred_url":"https://api.github.com/users/rchande/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rchande/subscriptions","organizations_url":"https://api.github.com/users/rchande/orgs","repos_url":"https://api.github.com/users/rchande/repos","events_url":"https://api.github.com/users/rchande/events{/privacy}","received_events_url":"https://api.github.com/users/rchande/received_events","type":"User","site_admin":false},"body":"…to be typing Function\r\n\r\nFixes #4208 \r\n\r\ncc @dpoeschl @jasonmalinowski @balajikris @davkean @DustinCampbell @Pilchie ","created_at":"2015-08-07T20:52:57Z","updated_at":"2015-08-07T20:56:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f1d10d9a9ef08942ae5638feb8656f7e9d97daca","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/roslyn/pulls/4428/commits","review_comments_url":"https://api.github.com/repos/dotnet/roslyn/pulls/4428/comments","review_comment_url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/4428/comments","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/36784e73e2763d184d1ea70f1a0779a75d0c8427","head":{"label":"rchande:fix4208","ref":"fix4208","sha":"36784e73e2763d184d1ea70f1a0779a75d0c8427","user":{"login":"rchande","id":3751401,"avatar_url":"https://avatars.githubusercontent.com/u/3751401?v=3","gravatar_id":"","url":"https://api.github.com/users/rchande","html_url":"https://github.com/rchande","followers_url":"https://api.github.com/users/rchande/followers","following_url":"https://api.github.com/users/rchande/following{/other_user}","gists_url":"https://api.github.com/users/rchande/gists{/gist_id}","starred_url":"https://api.github.com/users/rchande/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rchande/subscriptions","organizations_url":"https://api.github.com/users/rchande/orgs","repos_url":"https://api.github.com/users/rchande/repos","events_url":"https://api.github.com/users/rchande/events{/privacy}","received_events_url":"https://api.github.com/users/rchande/received_events","type":"User","site_admin":false},"repo":{"id":30547830,"name":"roslyn","full_name":"rchande/roslyn","owner":{"login":"rchande","id":3751401,"avatar_url":"https://avatars.githubusercontent.com/u/3751401?v=3","gravatar_id":"","url":"https://api.github.com/users/rchande","html_url":"https://github.com/rchande","followers_url":"https://api.github.com/users/rchande/followers","following_url":"https://api.github.com/users/rchande/following{/other_user}","gists_url":"https://api.github.com/users/rchande/gists{/gist_id}","starred_url":"https://api.github.com/users/rchande/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rchande/subscriptions","organizations_url":"https://api.github.com/users/rchande/orgs","repos_url":"https://api.github.com/users/rchande/repos","events_url":"https://api.github.com/users/rchande/events{/privacy}","received_events_url":"https://api.github.com/users/rchande/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rchande/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/rchande/roslyn","forks_url":"https://api.github.com/repos/rchande/roslyn/forks","keys_url":"https://api.github.com/repos/rchande/roslyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rchande/roslyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rchande/roslyn/teams","hooks_url":"https://api.github.com/repos/rchande/roslyn/hooks","issue_events_url":"https://api.github.com/repos/rchande/roslyn/issues/events{/number}","events_url":"https://api.github.com/repos/rchande/roslyn/events","assignees_url":"https://api.github.com/repos/rchande/roslyn/assignees{/user}","branches_url":"https://api.github.com/repos/rchande/roslyn/branches{/branch}","tags_url":"https://api.github.com/repos/rchande/roslyn/tags","blobs_url":"https://api.github.com/repos/rchande/roslyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rchande/roslyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rchande/roslyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/rchande/roslyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rchande/roslyn/statuses/{sha}","languages_url":"https://api.github.com/repos/rchande/roslyn/languages","stargazers_url":"https://api.github.com/repos/rchande/roslyn/stargazers","contributors_url":"https://api.github.com/repos/rchande/roslyn/contributors","subscribers_url":"https://api.github.com/repos/rchande/roslyn/subscribers","subscription_url":"https://api.github.com/repos/rchande/roslyn/subscription","commits_url":"https://api.github.com/repos/rchande/roslyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/rchande/roslyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/rchande/roslyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/rchande/roslyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/rchande/roslyn/contents/{+path}","compare_url":"https://api.github.com/repos/rchande/roslyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rchande/roslyn/merges","archive_url":"https://api.github.com/repos/rchande/roslyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rchande/roslyn/downloads","issues_url":"https://api.github.com/repos/rchande/roslyn/issues{/number}","pulls_url":"https://api.github.com/repos/rchande/roslyn/pulls{/number}","milestones_url":"https://api.github.com/repos/rchande/roslyn/milestones{/number}","notifications_url":"https://api.github.com/repos/rchande/roslyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rchande/roslyn/labels{/name}","releases_url":"https://api.github.com/repos/rchande/roslyn/releases{/id}","created_at":"2015-02-09T17:16:21Z","updated_at":"2015-02-09T17:16:48Z","pushed_at":"2015-08-07T20:51:03Z","git_url":"git://github.com/rchande/roslyn.git","ssh_url":"git@github.com:rchande/roslyn.git","clone_url":"https://github.com/rchande/roslyn.git","svn_url":"https://github.com/rchande/roslyn","homepage":"","size":88623,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"e4679ec3836e27f796c4291bb9a4c3a83be9a5c7","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","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,"name":"roslyn","full_name":"dotnet/roslyn","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","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}","created_at":"2015-01-11T02:39:03Z","updated_at":"2015-08-07T18:55:41Z","pushed_at":"2015-08-07T20:55:52Z","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":160485,"stargazers_count":2960,"watchers_count":2960,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":666,"mirror_url":null,"open_issues_count":1288,"forks":666,"open_issues":1288,"watchers":2960,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/4428"},"html":{"href":"https://github.com/dotnet/roslyn/pull/4428"},"issue":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/4428"},"comments":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/4428/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/4428/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/4428/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/roslyn/statuses/36784e73e2763d184d1ea70f1a0779a75d0c8427"}}}}