{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/30761746","id":30761746,"diff_hunk":"@@ -452,6 +453,60 @@ Namespace Microsoft.CodeAnalysis.VisualBasic\n             Return type.GetUseSiteErrorInfo()\n         End Function\n \n+        Private Function GetInternalXmlHelperType(syntax As VisualBasicSyntaxNode, diagBag As DiagnosticBag) As NamedTypeSymbol\n+            Debug.Assert(Me.ContainingType IsNot Nothing)\n+            Dim containingAssembly = Me.ContainingType.ContainingAssembly\n+\n+            Dim typeSymbol = GetInternalXmlHelperType(containingAssembly)\n+\n+            Dim useSiteError = GetUseSiteErrorForWellKnownType(typeSymbol)\n+            If useSiteError IsNot Nothing Then\n+                ReportDiagnostic(diagBag, syntax, useSiteError)\n+            End If\n+\n+            Return typeSymbol\n+        End Function\n+\n+        Private Shared Function GetInternalXmlHelperType(containingAssembly As AssemblySymbol) As NamedTypeSymbol\n+            Const metadataName = \"My.InternalXmlHelper\"\n+\n+            Dim typeSymbol = containingAssembly.GetTypeByMetadataName(\n+                metadataName,\n+                includeReferences:=True,\n+                isWellKnownType:=True)  ' It's not, but we want the extra validation.\n+\n+            If typeSymbol Is Nothing Then\n+                Dim emittedName = MetadataTypeName.FromFullName(metadataName)\n+                typeSymbol = New MissingMetadataTypeSymbol.TopLevel(containingAssembly.Modules(0), emittedName)\n+            End If\n+\n+            Return typeSymbol\n+        End Function\n+\n+        Private Function GetInternalXmlHelperValueExtensionProperty() As PropertySymbol\n+            Dim propertySymbol As PropertySymbol = Nothing","path":"src/Compilers/VisualBasic/Portable/Binding/Binder.vb","position":43,"original_position":43,"commit_id":"b9d9469aabc2111ad26ea43dbcde260129cb1c33","original_commit_id":"b9d9469aabc2111ad26ea43dbcde260129cb1c33","user":{"login":"amcasey","id":10508071,"avatar_url":"https://avatars.githubusercontent.com/u/10508071?v=3","gravatar_id":"","url":"https://api.github.com/users/amcasey","html_url":"https://github.com/amcasey","followers_url":"https://api.github.com/users/amcasey/followers","following_url":"https://api.github.com/users/amcasey/following{/other_user}","gists_url":"https://api.github.com/users/amcasey/gists{/gist_id}","starred_url":"https://api.github.com/users/amcasey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amcasey/subscriptions","organizations_url":"https://api.github.com/users/amcasey/orgs","repos_url":"https://api.github.com/users/amcasey/repos","events_url":"https://api.github.com/users/amcasey/events{/privacy}","received_events_url":"https://api.github.com/users/amcasey/received_events","type":"User","site_admin":false},"body":"Removed.","created_at":"2015-05-20T23:53:32Z","updated_at":"2015-05-20T23:53:32Z","html_url":"https://github.com/dotnet/roslyn/pull/2931#discussion_r30761746","pull_request_url":"https://api.github.com/repos/dotnet/roslyn/pulls/2931","_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/30761746"},"html":{"href":"https://github.com/dotnet/roslyn/pull/2931#discussion_r30761746"},"pull_request":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/2931"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/2931","id":35789047,"html_url":"https://github.com/dotnet/roslyn/pull/2931","diff_url":"https://github.com/dotnet/roslyn/pull/2931.diff","patch_url":"https://github.com/dotnet/roslyn/pull/2931.patch","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/2931","number":2931,"state":"open","locked":false,"title":"Add EE support for My.InternalXmlHelper","user":{"login":"amcasey","id":10508071,"avatar_url":"https://avatars.githubusercontent.com/u/10508071?v=3","gravatar_id":"","url":"https://api.github.com/users/amcasey","html_url":"https://github.com/amcasey","followers_url":"https://api.github.com/users/amcasey/followers","following_url":"https://api.github.com/users/amcasey/following{/other_user}","gists_url":"https://api.github.com/users/amcasey/gists{/gist_id}","starred_url":"https://api.github.com/users/amcasey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amcasey/subscriptions","organizations_url":"https://api.github.com/users/amcasey/orgs","repos_url":"https://api.github.com/users/amcasey/repos","events_url":"https://api.github.com/users/amcasey/events{/privacy}","received_events_url":"https://api.github.com/users/amcasey/received_events","type":"User","site_admin":false},"body":"Two things were preventing the EE from finding the type, which is needed\r\nfor XML literal operations in VB:\r\n\r\n1. It is marked internal and the accessibility check happened in\r\nAssemblySymbol, rather than then binder, so it was not hijacked.\r\n\r\n2. It is marked with EmbeddedAttribute and is not from the SourceModule of\r\nthe compilation (it's from the module of the current frame).\r\n\r\nWe can resolve both of these problems by doing the lookups as though we\r\nwere in the module containing the current frame.  This required two\r\nchanges:\r\n\r\n1. Remove InternalXmlHelper from WellKnownTypes and give it its own code\r\npath.  Explicitly pass the appropriate assembly symbol to the new helper.\r\n\r\n2. In Binder.CheckViability, look for a containing module before falling\r\nback on the SourceModule of the compilation.\r\n\r\nBy preserving the accessibility checks during type lookup (but doing them\r\nfrom the perspective of a different assembly), we retain the compiler's\r\nprotection against pulling in a copy from each VB reference (i.e.\r\nambiguity).\r\n\r\nThe main caveat is that My.InternalXmlHelper will not be found if it was\r\nnot embedded in the module containing the current frame - even if it is\r\nunambiguously available in a referenced assembly.\r\n\r\nFixes #964","created_at":"2015-05-20T00:42:04Z","updated_at":"2015-05-20T23:53:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"05f99e91b71604cee6cb9f4378ffaa38c46c6f49","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/roslyn/pulls/2931/commits","review_comments_url":"https://api.github.com/repos/dotnet/roslyn/pulls/2931/comments","review_comment_url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/2931/comments","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/b9d9469aabc2111ad26ea43dbcde260129cb1c33","head":{"label":"amcasey:GH964","ref":"GH964","sha":"b9d9469aabc2111ad26ea43dbcde260129cb1c33","user":{"login":"amcasey","id":10508071,"avatar_url":"https://avatars.githubusercontent.com/u/10508071?v=3","gravatar_id":"","url":"https://api.github.com/users/amcasey","html_url":"https://github.com/amcasey","followers_url":"https://api.github.com/users/amcasey/followers","following_url":"https://api.github.com/users/amcasey/following{/other_user}","gists_url":"https://api.github.com/users/amcasey/gists{/gist_id}","starred_url":"https://api.github.com/users/amcasey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amcasey/subscriptions","organizations_url":"https://api.github.com/users/amcasey/orgs","repos_url":"https://api.github.com/users/amcasey/repos","events_url":"https://api.github.com/users/amcasey/events{/privacy}","received_events_url":"https://api.github.com/users/amcasey/received_events","type":"User","site_admin":false},"repo":{"id":30559373,"name":"roslyn","full_name":"amcasey/roslyn","owner":{"login":"amcasey","id":10508071,"avatar_url":"https://avatars.githubusercontent.com/u/10508071?v=3","gravatar_id":"","url":"https://api.github.com/users/amcasey","html_url":"https://github.com/amcasey","followers_url":"https://api.github.com/users/amcasey/followers","following_url":"https://api.github.com/users/amcasey/following{/other_user}","gists_url":"https://api.github.com/users/amcasey/gists{/gist_id}","starred_url":"https://api.github.com/users/amcasey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amcasey/subscriptions","organizations_url":"https://api.github.com/users/amcasey/orgs","repos_url":"https://api.github.com/users/amcasey/repos","events_url":"https://api.github.com/users/amcasey/events{/privacy}","received_events_url":"https://api.github.com/users/amcasey/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/amcasey/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/amcasey/roslyn","forks_url":"https://api.github.com/repos/amcasey/roslyn/forks","keys_url":"https://api.github.com/repos/amcasey/roslyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amcasey/roslyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amcasey/roslyn/teams","hooks_url":"https://api.github.com/repos/amcasey/roslyn/hooks","issue_events_url":"https://api.github.com/repos/amcasey/roslyn/issues/events{/number}","events_url":"https://api.github.com/repos/amcasey/roslyn/events","assignees_url":"https://api.github.com/repos/amcasey/roslyn/assignees{/user}","branches_url":"https://api.github.com/repos/amcasey/roslyn/branches{/branch}","tags_url":"https://api.github.com/repos/amcasey/roslyn/tags","blobs_url":"https://api.github.com/repos/amcasey/roslyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amcasey/roslyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amcasey/roslyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/amcasey/roslyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amcasey/roslyn/statuses/{sha}","languages_url":"https://api.github.com/repos/amcasey/roslyn/languages","stargazers_url":"https://api.github.com/repos/amcasey/roslyn/stargazers","contributors_url":"https://api.github.com/repos/amcasey/roslyn/contributors","subscribers_url":"https://api.github.com/repos/amcasey/roslyn/subscribers","subscription_url":"https://api.github.com/repos/amcasey/roslyn/subscription","commits_url":"https://api.github.com/repos/amcasey/roslyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/amcasey/roslyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/amcasey/roslyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/amcasey/roslyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/amcasey/roslyn/contents/{+path}","compare_url":"https://api.github.com/repos/amcasey/roslyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amcasey/roslyn/merges","archive_url":"https://api.github.com/repos/amcasey/roslyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amcasey/roslyn/downloads","issues_url":"https://api.github.com/repos/amcasey/roslyn/issues{/number}","pulls_url":"https://api.github.com/repos/amcasey/roslyn/pulls{/number}","milestones_url":"https://api.github.com/repos/amcasey/roslyn/milestones{/number}","notifications_url":"https://api.github.com/repos/amcasey/roslyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amcasey/roslyn/labels{/name}","releases_url":"https://api.github.com/repos/amcasey/roslyn/releases{/id}","created_at":"2015-02-09T21:27:09Z","updated_at":"2015-02-23T22:59:36Z","pushed_at":"2015-05-20T00:41:24Z","git_url":"git://github.com/amcasey/roslyn.git","ssh_url":"git@github.com:amcasey/roslyn.git","clone_url":"https://github.com/amcasey/roslyn.git","svn_url":"https://github.com/amcasey/roslyn","homepage":"","size":76884,"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":"b36286bd28de9ee7605c1b6c9b53c54f557d3f09","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-05-20T20:01:42Z","pushed_at":"2015-05-20T23:21: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":136166,"stargazers_count":2332,"watchers_count":2332,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":499,"mirror_url":null,"open_issues_count":850,"forks":499,"open_issues":850,"watchers":2332,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/2931"},"html":{"href":"https://github.com/dotnet/roslyn/pull/2931"},"issue":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/2931"},"comments":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/2931/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/2931/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/2931/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/roslyn/statuses/b9d9469aabc2111ad26ea43dbcde260129cb1c33"}}}}