{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/208337654","pull_request_review_id":144126355,"id":208337654,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwODMzNzY1NA==","diff_hunk":"@@ -33,6 +33,11 @@ private void EmitStackAllocInitializers(TypeSymbol type, BoundArrayInitializatio\n                 if (data.All(datum => datum == data[0]))\n                 {\n                     _builder.EmitStackAllocBlockInitializer(data, inits.Syntax, emitInitBlock: true, _diagnostics);\n+\n+                    if (initializationStyle == ArrayInitializerStyle.Mixed)","path":"src/Compilers/CSharp/Portable/CodeGen/EmitStackAllocInitializer.cs","position":5,"original_position":5,"commit_id":"759e37b202944476b05e3c45913f23cdf22153df","original_commit_id":"759e37b202944476b05e3c45913f23cdf22153df","user":{"login":"alrz","id":3105979,"node_id":"MDQ6VXNlcjMxMDU5Nzk=","avatar_url":"https://avatars2.githubusercontent.com/u/3105979?v=4","gravatar_id":"","url":"https://api.github.com/users/alrz","html_url":"https://github.com/alrz","followers_url":"https://api.github.com/users/alrz/followers","following_url":"https://api.github.com/users/alrz/following{/other_user}","gists_url":"https://api.github.com/users/alrz/gists{/gist_id}","starred_url":"https://api.github.com/users/alrz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alrz/subscriptions","organizations_url":"https://api.github.com/users/alrz/orgs","repos_url":"https://api.github.com/users/alrz/repos","events_url":"https://api.github.com/users/alrz/events{/privacy}","received_events_url":"https://api.github.com/users/alrz/received_events","type":"User","site_admin":false},"body":">Could we simplify this to having that return whether or not this was constant\r\n\r\n`GetRawData` returns `0` for non constants and the constant zero (which is the source of this bug)\r\n\r\n`GetRawData` only helps to know if we can use initblk (same bytes), otherwise we already know about constants via `ShouldEmitBlockInitializerForStackAlloc`. \r\n\r\nSo, in order to do a mixed style init with initblk we should examine the resulting byte array: all the none-zero bytes must be the same. And due to the double-entendre of \"zero\", may not be straightforward.","created_at":"2018-08-07T18:27:32Z","updated_at":"2018-08-07T18:27:32Z","html_url":"https://github.com/dotnet/roslyn/pull/29097#discussion_r208337654","pull_request_url":"https://api.github.com/repos/dotnet/roslyn/pulls/29097","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/208337654"},"html":{"href":"https://github.com/dotnet/roslyn/pull/29097#discussion_r208337654"},"pull_request":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/29097"}},"in_reply_to_id":208154597},"pull_request":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/29097","id":206305407,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA2MzA1NDA3","html_url":"https://github.com/dotnet/roslyn/pull/29097","diff_url":"https://github.com/dotnet/roslyn/pull/29097.diff","patch_url":"https://github.com/dotnet/roslyn/pull/29097.patch","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/29097","number":29097,"state":"open","locked":false,"title":"Handle mixed initializer style with initblk","user":{"login":"alrz","id":3105979,"node_id":"MDQ6VXNlcjMxMDU5Nzk=","avatar_url":"https://avatars2.githubusercontent.com/u/3105979?v=4","gravatar_id":"","url":"https://api.github.com/users/alrz","html_url":"https://github.com/alrz","followers_url":"https://api.github.com/users/alrz/followers","following_url":"https://api.github.com/users/alrz/following{/other_user}","gists_url":"https://api.github.com/users/alrz/gists{/gist_id}","starred_url":"https://api.github.com/users/alrz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alrz/subscriptions","organizations_url":"https://api.github.com/users/alrz/orgs","repos_url":"https://api.github.com/users/alrz/repos","events_url":"https://api.github.com/users/alrz/events{/privacy}","received_events_url":"https://api.github.com/users/alrz/received_events","type":"User","site_admin":false},"body":"Fixes https://github.com/dotnet/roslyn/issues/29092","created_at":"2018-08-06T06:58:44Z","updated_at":"2018-08-07T18:27:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"84818c162c08fc94c67cdcdecfcfba7e6cc391b7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[{"name":"roslyn-compiler","id":1803172,"node_id":"MDQ6VGVhbTE4MDMxNzI=","slug":"roslyn-compiler","description":"Roslyn Compiler Team","privacy":"closed","url":"https://api.github.com/teams/1803172","members_url":"https://api.github.com/teams/1803172/members{/member}","repositories_url":"https://api.github.com/teams/1803172/repos","permission":"pull"}],"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":288147422,"node_id":"MDU6TGFiZWwyODgxNDc0MjI=","url":"https://api.github.com/repos/dotnet/roslyn/labels/Community","name":"Community","color":"0e8a16","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/roslyn/pulls/29097/commits","review_comments_url":"https://api.github.com/repos/dotnet/roslyn/pulls/29097/comments","review_comment_url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/29097/comments","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/759e37b202944476b05e3c45913f23cdf22153df","head":{"label":"alrz:issue29092","ref":"issue29092","sha":"759e37b202944476b05e3c45913f23cdf22153df","user":{"login":"alrz","id":3105979,"node_id":"MDQ6VXNlcjMxMDU5Nzk=","avatar_url":"https://avatars2.githubusercontent.com/u/3105979?v=4","gravatar_id":"","url":"https://api.github.com/users/alrz","html_url":"https://github.com/alrz","followers_url":"https://api.github.com/users/alrz/followers","following_url":"https://api.github.com/users/alrz/following{/other_user}","gists_url":"https://api.github.com/users/alrz/gists{/gist_id}","starred_url":"https://api.github.com/users/alrz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alrz/subscriptions","organizations_url":"https://api.github.com/users/alrz/orgs","repos_url":"https://api.github.com/users/alrz/repos","events_url":"https://api.github.com/users/alrz/events{/privacy}","received_events_url":"https://api.github.com/users/alrz/received_events","type":"User","site_admin":false},"repo":{"id":54348191,"node_id":"MDEwOlJlcG9zaXRvcnk1NDM0ODE5MQ==","name":"roslyn","full_name":"alrz/roslyn","owner":{"login":"alrz","id":3105979,"node_id":"MDQ6VXNlcjMxMDU5Nzk=","avatar_url":"https://avatars2.githubusercontent.com/u/3105979?v=4","gravatar_id":"","url":"https://api.github.com/users/alrz","html_url":"https://github.com/alrz","followers_url":"https://api.github.com/users/alrz/followers","following_url":"https://api.github.com/users/alrz/following{/other_user}","gists_url":"https://api.github.com/users/alrz/gists{/gist_id}","starred_url":"https://api.github.com/users/alrz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alrz/subscriptions","organizations_url":"https://api.github.com/users/alrz/orgs","repos_url":"https://api.github.com/users/alrz/repos","events_url":"https://api.github.com/users/alrz/events{/privacy}","received_events_url":"https://api.github.com/users/alrz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alrz/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/alrz/roslyn","forks_url":"https://api.github.com/repos/alrz/roslyn/forks","keys_url":"https://api.github.com/repos/alrz/roslyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alrz/roslyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alrz/roslyn/teams","hooks_url":"https://api.github.com/repos/alrz/roslyn/hooks","issue_events_url":"https://api.github.com/repos/alrz/roslyn/issues/events{/number}","events_url":"https://api.github.com/repos/alrz/roslyn/events","assignees_url":"https://api.github.com/repos/alrz/roslyn/assignees{/user}","branches_url":"https://api.github.com/repos/alrz/roslyn/branches{/branch}","tags_url":"https://api.github.com/repos/alrz/roslyn/tags","blobs_url":"https://api.github.com/repos/alrz/roslyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alrz/roslyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alrz/roslyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/alrz/roslyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alrz/roslyn/statuses/{sha}","languages_url":"https://api.github.com/repos/alrz/roslyn/languages","stargazers_url":"https://api.github.com/repos/alrz/roslyn/stargazers","contributors_url":"https://api.github.com/repos/alrz/roslyn/contributors","subscribers_url":"https://api.github.com/repos/alrz/roslyn/subscribers","subscription_url":"https://api.github.com/repos/alrz/roslyn/subscription","commits_url":"https://api.github.com/repos/alrz/roslyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/alrz/roslyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/alrz/roslyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/alrz/roslyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/alrz/roslyn/contents/{+path}","compare_url":"https://api.github.com/repos/alrz/roslyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alrz/roslyn/merges","archive_url":"https://api.github.com/repos/alrz/roslyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alrz/roslyn/downloads","issues_url":"https://api.github.com/repos/alrz/roslyn/issues{/number}","pulls_url":"https://api.github.com/repos/alrz/roslyn/pulls{/number}","milestones_url":"https://api.github.com/repos/alrz/roslyn/milestones{/number}","notifications_url":"https://api.github.com/repos/alrz/roslyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alrz/roslyn/labels{/name}","releases_url":"https://api.github.com/repos/alrz/roslyn/releases{/id}","deployments_url":"https://api.github.com/repos/alrz/roslyn/deployments","created_at":"2016-03-21T00:28:36Z","updated_at":"2016-03-21T00:29:08Z","pushed_at":"2018-08-06T17:20:15Z","git_url":"git://github.com/alrz/roslyn.git","ssh_url":"git@github.com:alrz/roslyn.git","clone_url":"https://github.com/alrz/roslyn.git","svn_url":"https://github.com/alrz/roslyn","homepage":"","size":354492,"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:master","ref":"master","sha":"ddd03771a64f10cbc3abdff4bcb8ad3438667770","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-08-07T17:41:43Z","pushed_at":"2018-08-07T18:15:18Z","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":423829,"stargazers_count":9678,"watchers_count":9678,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2300,"mirror_url":null,"archived":false,"open_issues_count":5024,"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":2300,"open_issues":5024,"watchers":9678,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/29097"},"html":{"href":"https://github.com/dotnet/roslyn/pull/29097"},"issue":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/29097"},"comments":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/29097/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/29097/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/29097/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/roslyn/statuses/759e37b202944476b05e3c45913f23cdf22153df"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"alrz"}}