{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/57356723","id":57356723,"diff_hunk":"@@ -525,5 +649,260 @@ .maxstack  3\n \");\n         }\n \n+        [Fact]\n+        public void TupleUsageWithoutTupleLibrary()\n+        {\n+            var source = @\"\n+class C\n+{\n+    static void Main()\n+    {\n+        (int, string a) x = (b: 1, \"\"hello\"\", 2);\n+    }\n+}\n+\";\n+            // PROTOTYPE we should expect specific diagnostics\n+            var comp = CreateCompilationWithMscorlib(source);\n+            Assert.True(comp.GetDiagnostics().HasAnyErrors());\n+        }\n+\n+        [Fact]\n+        public void TupleWithDuplicateNames()\n+        {\n+            var source = @\"\n+class C\n+{\n+    static void Main()\n+    {\n+        (int a, string a) x = (b: 1, b: \"\"hello\"\", b: 2);\n     }\n }\n+\" + trivial2uple + trivial3uple;\n+        }\n+\n+        [Fact]\n+        public void DefaultValueForTuple()\n+        {\n+            var source = @\"\n+class C\n+{\n+    static void Main()\n+    {\n+        (int a, string b) x = (1, \"\"hello\"\");\n+        x = default((int, string));\n+        System.Console.WriteLine(x.a);\n+        System.Console.WriteLine(x.b ?? \"\"null\"\");\n+    }\n+}\n+\" + trivial2uple;\n+\n+            var comp = CompileAndVerify(source, expectedOutput: @\"0\n+null\");\n+        }\n+\n+        [Fact]\n+        public void TupleWithDuplicateMemberNames()\n+        {\n+            var source = @\"\n+class C\n+{\n+    static void Main()\n+    {\n+        (int a, string a) x = (b: 1, c: \"\"hello\"\", b: 2);\n+    }\n+}\n+\" + trivial2uple + trivial3uple;\n+\n+            // PROTOTYPE we also expect duplicate member name error on the tuple type declaration\n+            var comp = CreateCompilationWithMscorlib(source);\n+            comp.VerifyDiagnostics(\n+                // (6,50): error CS8202: Tuple member names must be unique.\n+                //         (int a, string a) x = (b: 1, c: \"hello\", b: 2);\n+                Diagnostic(ErrorCode.ERR_TupleDuplicateMemberName, \"b\").WithLocation(6, 50));\n+        }\n+\n+        [Fact]\n+        public void TupleWithReservedMemberNames()\n+        {\n+            var source = @\"\n+class C\n+{\n+    static void Main()\n+    {\n+        (int Item1, string Item3) x = (Item2: 1, Item4: \"\"hello\"\", Item3: 2);\n+    }\n+}\n+\" + trivial2uple + trivial3uple;\n+\n+            // PROTOTYPE we also expect reserved member name error on the tuple type declaration\n+            var comp = CreateCompilationWithMscorlib(source);\n+            comp.VerifyDiagnostics(\n+                // (6,40): error CS8201: Tuple member name is disallowed at this position.\n+                //         (int Item1, string Item3) x = (Item2: 1, Item4: \"hello\", Item3: 2);\n+                Diagnostic(ErrorCode.ERR_TupleReservedMemberName, \"Item2\").WithLocation(6, 40),\n+                // (6,50): error CS8201: Tuple member name is disallowed at this position.\n+                //         (int Item1, string Item3) x = (Item2: 1, Item4: \"hello\", Item3: 2);\n+                Diagnostic(ErrorCode.ERR_TupleReservedMemberName, \"Item4\").WithLocation(6, 50));\n+        }","path":"src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenTupleTest.cs","position":251,"original_position":251,"commit_id":"e7e5f2ff339c2fbf39828f28fe9fa91a2846e4df","original_commit_id":"e7e5f2ff339c2fbf39828f28fe9fa91a2846e4df","user":{"login":"AlekseyTs","id":10522107,"avatar_url":"https://avatars.githubusercontent.com/u/10522107?v=3","gravatar_id":"","url":"https://api.github.com/users/AlekseyTs","html_url":"https://github.com/AlekseyTs","followers_url":"https://api.github.com/users/AlekseyTs/followers","following_url":"https://api.github.com/users/AlekseyTs/following{/other_user}","gists_url":"https://api.github.com/users/AlekseyTs/gists{/gist_id}","starred_url":"https://api.github.com/users/AlekseyTs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlekseyTs/subscriptions","organizations_url":"https://api.github.com/users/AlekseyTs/orgs","repos_url":"https://api.github.com/users/AlekseyTs/repos","events_url":"https://api.github.com/users/AlekseyTs/events{/privacy}","received_events_url":"https://api.github.com/users/AlekseyTs/received_events","type":"User","site_admin":false},"body":"We should have a test for (Item1: 1, Item1: 2) and for (Item2: 1, Item2: 2). It looks like current behavior should be good, but we need to have test coverage for scenarios like that.","created_at":"2016-03-24T17:40:45Z","updated_at":"2016-03-24T17:40:45Z","html_url":"https://github.com/dotnet/roslyn/pull/10018#discussion_r57356723","pull_request_url":"https://api.github.com/repos/dotnet/roslyn/pulls/10018","_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/57356723"},"html":{"href":"https://github.com/dotnet/roslyn/pull/10018#discussion_r57356723"},"pull_request":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/10018"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/10018","id":63929509,"html_url":"https://github.com/dotnet/roslyn/pull/10018","diff_url":"https://github.com/dotnet/roslyn/pull/10018.diff","patch_url":"https://github.com/dotnet/roslyn/pull/10018.patch","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/10018","number":10018,"state":"open","locked":false,"title":"Tuples: binding tuple type declaration; symbol support for tuples 3-7","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},"body":"Allow binding of tuple type declarations such as `(int, a) = ...` or `(int, string) M() { ... }`.\r\n\r\nAlso TupleTypeSymbol previously only supported 2-tuples. This adds support for tuples 3 through 7. Above 7 will come later.\r\n\r\nPlease advise whether the arrays of well-known types could be done better (lazy init?).\r\n","created_at":"2016-03-23T18:21:44Z","updated_at":"2016-03-24T17:40:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0032d967650da0ae539261ff63afd475b91afb9d","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},"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/roslyn/pulls/10018/commits","review_comments_url":"https://api.github.com/repos/dotnet/roslyn/pulls/10018/comments","review_comment_url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/10018/comments","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/e7e5f2ff339c2fbf39828f28fe9fa91a2846e4df","head":{"label":"jcouv:tuples","ref":"tuples","sha":"e7e5f2ff339c2fbf39828f28fe9fa91a2846e4df","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},"repo":{"id":50162064,"name":"roslyn","full_name":"jcouv/roslyn","owner":{"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},"private":false,"html_url":"https://github.com/jcouv/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/jcouv/roslyn","forks_url":"https://api.github.com/repos/jcouv/roslyn/forks","keys_url":"https://api.github.com/repos/jcouv/roslyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jcouv/roslyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jcouv/roslyn/teams","hooks_url":"https://api.github.com/repos/jcouv/roslyn/hooks","issue_events_url":"https://api.github.com/repos/jcouv/roslyn/issues/events{/number}","events_url":"https://api.github.com/repos/jcouv/roslyn/events","assignees_url":"https://api.github.com/repos/jcouv/roslyn/assignees{/user}","branches_url":"https://api.github.com/repos/jcouv/roslyn/branches{/branch}","tags_url":"https://api.github.com/repos/jcouv/roslyn/tags","blobs_url":"https://api.github.com/repos/jcouv/roslyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jcouv/roslyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jcouv/roslyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/jcouv/roslyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jcouv/roslyn/statuses/{sha}","languages_url":"https://api.github.com/repos/jcouv/roslyn/languages","stargazers_url":"https://api.github.com/repos/jcouv/roslyn/stargazers","contributors_url":"https://api.github.com/repos/jcouv/roslyn/contributors","subscribers_url":"https://api.github.com/repos/jcouv/roslyn/subscribers","subscription_url":"https://api.github.com/repos/jcouv/roslyn/subscription","commits_url":"https://api.github.com/repos/jcouv/roslyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/jcouv/roslyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/jcouv/roslyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/jcouv/roslyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/jcouv/roslyn/contents/{+path}","compare_url":"https://api.github.com/repos/jcouv/roslyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jcouv/roslyn/merges","archive_url":"https://api.github.com/repos/jcouv/roslyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jcouv/roslyn/downloads","issues_url":"https://api.github.com/repos/jcouv/roslyn/issues{/number}","pulls_url":"https://api.github.com/repos/jcouv/roslyn/pulls{/number}","milestones_url":"https://api.github.com/repos/jcouv/roslyn/milestones{/number}","notifications_url":"https://api.github.com/repos/jcouv/roslyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jcouv/roslyn/labels{/name}","releases_url":"https://api.github.com/repos/jcouv/roslyn/releases{/id}","deployments_url":"https://api.github.com/repos/jcouv/roslyn/deployments","created_at":"2016-01-22T06:19:22Z","updated_at":"2016-01-22T06:19:52Z","pushed_at":"2016-03-24T15:26:04Z","git_url":"git://github.com/jcouv/roslyn.git","ssh_url":"git@github.com:jcouv/roslyn.git","clone_url":"https://github.com/jcouv/roslyn.git","svn_url":"https://github.com/jcouv/roslyn","homepage":"","size":147280,"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:features/tuples","ref":"features/tuples","sha":"577072feb763131d6f96060c8323ff887de462ee","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}","deployments_url":"https://api.github.com/repos/dotnet/roslyn/deployments","created_at":"2015-01-11T02:39:03Z","updated_at":"2016-03-24T16:09:57Z","pushed_at":"2016-03-24T17:36:45Z","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":172566,"stargazers_count":4706,"watchers_count":4706,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1181,"mirror_url":null,"open_issues_count":2511,"forks":1181,"open_issues":2511,"watchers":4706,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/10018"},"html":{"href":"https://github.com/dotnet/roslyn/pull/10018"},"issue":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/10018"},"comments":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/10018/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/10018/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/10018/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/roslyn/statuses/e7e5f2ff339c2fbf39828f28fe9fa91a2846e4df"}}}}