{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/12104","repository_url":"https://api.github.com/repos/dotnet/roslyn","labels_url":"https://api.github.com/repos/dotnet/roslyn/issues/12104/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/12104/comments","events_url":"https://api.github.com/repos/dotnet/roslyn/issues/12104/events","html_url":"https://github.com/dotnet/roslyn/pull/12104","id":161256067,"number":12104,"title":"Deconstruction-declaration parsing for local declaration, for and foreach","user":{"login":"jcouv","id":12466233,"avatar_url":"https://avatars.githubusercontent.com/u/12466233?v=3","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},"labels":[{"url":"https://api.github.com/repos/dotnet/roslyn/labels/Area-Compilers","name":"Area-Compilers","color":"5319e7"},{"url":"https://api.github.com/repos/dotnet/roslyn/labels/cla-already-signed","name":"cla-already-signed","color":"009800"},{"url":"https://api.github.com/repos/dotnet/roslyn/labels/New%20Language%20Feature%20-%20Tuples","name":"New Language Feature - Tuples","color":"bfd4f2"}],"state":"open","locked":false,"assignee":{"login":"jcouv","id":12466233,"avatar_url":"https://avatars.githubusercontent.com/u/12466233?v=3","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,"avatar_url":"https://avatars.githubusercontent.com/u/12466233?v=3","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}],"milestone":null,"comments":10,"created_at":"2016-06-20T17:59:37Z","updated_at":"2016-06-24T17:35:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/12104","html_url":"https://github.com/dotnet/roslyn/pull/12104","diff_url":"https://github.com/dotnet/roslyn/pull/12104.diff","patch_url":"https://github.com/dotnet/roslyn/pull/12104.patch"},"body":"Adds parsing for three deconstruction-declaration contexts. Other contexts (such as `let` or `from` will be added later).\r\n\r\n@dotnet/roslyn-compiler for review. Thanks\r\n\r\n```C#\r\n// All those are parsed as a LocalDeclarationStatement, except that its VariableDeclaration is extended to hold a DeconstructionDeclaration\r\n// DeconstructionDeclaration is DeconstructionVariables + equalsToken + expression\r\n(Int32 a, Int64 b) = foo;\r\n((Int32 a, Int64 b), Int32 c) = foo;\r\nvar (a, b) = foo;\r\nvar ((a, b), c) = foo;\r\n(Int32 x, var (y, z)) = foo; // var syntax inside list syntax\r\n\r\n// This is still a method call\r\nvar(a, b);\r\n\r\n// ForStatement with the VariableDeclaration holding a DeconstructionDeclaration\r\nfor ((Int32 x, Int64 y) = foo; ; ) { }\r\nfor (var (x, y) = foo; ; ) { }\r\n\r\n// Foreach statement which is extended to hold DeconstructionVariables\r\nforeach ((int x, var y) in foo) { }\r\nforeach (var (x, y) in foo) { }\r\n```\r\n\r\nNote 1: because my VS is busted, I expect some public API errors. I will fix that before checking in.\r\n\r\nNote 2: this change includes a copy of Aleksey's recent change in outvar branch to support Internal=\"true\" in Syntax.xml, which will help maintain a backwards compatible public API."},"comment":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/comments/228410100","html_url":"https://github.com/dotnet/roslyn/pull/12104#issuecomment-228410100","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/12104","id":228410100,"user":{"login":"cston","id":10732005,"avatar_url":"https://avatars.githubusercontent.com/u/10732005?v=3","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},"created_at":"2016-06-24T17:35:05Z","updated_at":"2016-06-24T17:35:05Z","body":"What kind of parse errors do we report for contexts where deconstruct is not allowed? For instance ```using ((x, y) = F()) { ... }```. Is it necessary to report good errors in these cases?"}}
{"actor":{"display_login":"cston"}}