{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/29363258","id":29363258,"diff_hunk":"@@ -85,5 +92,51 @@ internal static BoundNode Rewrite(CSharpCompilation compilation, EENamedTypeSymb\n                 statements.Add(new BoundExpressionStatement(syntax, assignment));\n             }\n         }\n+\n+        private static BoundExpression GetCustomTypeInfoPayloadId(CSharpSyntaxNode syntax, MethodSymbol guidConstructor, bool hasCustomTypeInfoPayload)\n+        {\n+            if (!hasCustomTypeInfoPayload)\n+            {\n+                return new BoundDefaultOperator(syntax, guidConstructor.ContainingType);\n+            }\n+\n+            var value = ConstantValue.Create(DynamicFlagsCustomTypeInfo.PayloadTypeId.ToString());\n+            return new BoundObjectCreationExpression(\n+                syntax,\n+                guidConstructor,\n+                new BoundLiteral(syntax, value, guidConstructor.ContainingType));\n+        }\n+\n+        private static BoundExpression GetCustomTypeInfoPayload(LocalSymbol local, CSharpSyntaxNode syntax, CSharpCompilation compilation, out bool hasCustomTypeInfoPayload)\n+        {\n+            var byteArrayType = new ArrayTypeSymbol(\n+                compilation.Assembly,\n+                compilation.GetSpecialType(SpecialType.System_Byte));\n+\n+            var flags = CSharpCompilation.DynamicTransformsEncoder.Encode(local.Type, customModifiersCount: 0, refKind: RefKind.None).ToArray();\n+            var bytes = new DynamicFlagsCustomTypeInfo(new BitArray(flags)).GetCustomTypeInfoPayload();\n+            hasCustomTypeInfoPayload = bytes != null;","path":"src/ExpressionEvaluator/CSharp/Source/ExpressionCompiler/Rewriters/LocalDeclarationRewriter.cs","position":62,"original_position":62,"commit_id":"c8c83b7ab9b888034c54e36e196c86d87ae86f89","original_commit_id":"c8c83b7ab9b888034c54e36e196c86d87ae86f89","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":"I see the assert you're talking about, but I also know that code path is being hit, so I'll investigate.","created_at":"2015-04-29T18:09:08Z","updated_at":"2015-04-29T18:09:08Z","html_url":"https://github.com/dotnet/roslyn/pull/2252#discussion_r29363258","pull_request_url":"https://api.github.com/repos/dotnet/roslyn/pulls/2252","_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/29363258"},"html":{"href":"https://github.com/dotnet/roslyn/pull/2252#discussion_r29363258"},"pull_request":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/2252"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/2252","id":34092858,"html_url":"https://github.com/dotnet/roslyn/pull/2252","diff_url":"https://github.com/dotnet/roslyn/pull/2252.diff","patch_url":"https://github.com/dotnet/roslyn/pull/2252.patch","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/2252","number":2252,"state":"open","locked":false,"title":"Add support for \"dynamic\" Immediate window locals","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":"This is the third of a sequence of changes (see also 3dd1f2b and f2cac22).\r\nIn this change we start consuming the custom type info (effectively just\r\nthe flags of DynamicAttribute packed into a byte array) associated with\r\nlocals declared in the Immediate window.\r\n\r\nTODO: The GetAliases API has not been implemented, but this functionality\r\nwill light up when it is.","created_at":"2015-04-24T22:54:11Z","updated_at":"2015-04-29T18:09:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"646fab73ec3661b9f6076c178b85f9685e42d40a","assignee":{"login":"KevinH-MS","id":6464209,"avatar_url":"https://avatars.githubusercontent.com/u/6464209?v=3","gravatar_id":"","url":"https://api.github.com/users/KevinH-MS","html_url":"https://github.com/KevinH-MS","followers_url":"https://api.github.com/users/KevinH-MS/followers","following_url":"https://api.github.com/users/KevinH-MS/following{/other_user}","gists_url":"https://api.github.com/users/KevinH-MS/gists{/gist_id}","starred_url":"https://api.github.com/users/KevinH-MS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KevinH-MS/subscriptions","organizations_url":"https://api.github.com/users/KevinH-MS/orgs","repos_url":"https://api.github.com/users/KevinH-MS/repos","events_url":"https://api.github.com/users/KevinH-MS/events{/privacy}","received_events_url":"https://api.github.com/users/KevinH-MS/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/roslyn/pulls/2252/commits","review_comments_url":"https://api.github.com/repos/dotnet/roslyn/pulls/2252/comments","review_comment_url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/2252/comments","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/c8c83b7ab9b888034c54e36e196c86d87ae86f89","head":{"label":"amcasey:DD1087216_3","ref":"DD1087216_3","sha":"c8c83b7ab9b888034c54e36e196c86d87ae86f89","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-04-29T17:33:02Z","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":70127,"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":"860fa08fd335dfb338982e58804f24f6f73acf60","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-04-29T17:53:53Z","pushed_at":"2015-04-29T18:06:38Z","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":118102,"stargazers_count":2045,"watchers_count":2045,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":439,"mirror_url":null,"open_issues_count":746,"forks":439,"open_issues":746,"watchers":2045,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/2252"},"html":{"href":"https://github.com/dotnet/roslyn/pull/2252"},"issue":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/2252"},"comments":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/2252/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/2252/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/2252/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/roslyn/statuses/c8c83b7ab9b888034c54e36e196c86d87ae86f89"}}}}