{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/55290712","id":55290712,"diff_hunk":"@@ -1098,20 +1128,100 @@ interface I3 : I1, I2 { }\n             var compilation = CreateCompilationWithMscorlib45(source, options: TestOptions.DebugExe, parseOptions: patternParseOptions);\n \n             compilation.VerifyDiagnostics(\n-                // (8,37): error CS0117: 'I3' does not contain a definition for 'Property'\n+                // (8,37): error CS0229: Ambiguity between 'I1.Property' and 'I2.Property'\n                 //         Console.WriteLine(o is I3 { Property is 4 });\n-                Diagnostic(ErrorCode.ERR_NoSuchMember, \"Property\").WithArguments(\"I3\", \"Property\").WithLocation(8, 37)\n+                Diagnostic(ErrorCode.ERR_AmbigMember, \"Property\").WithArguments(\"I1.Property\", \"I2.Property\").WithLocation(8, 37)\n                 );\n             var tree = compilation.SyntaxTrees.Single();\n             var model = compilation.GetSemanticModel(tree);\n-            var propPats = tree.GetRoot().DescendantNodes().OfType<SubPropertyPatternSyntax>().ToArray();\n+            var propPats = tree.GetRoot().DescendantNodes().OfType<PropertyPatternSyntax>().SelectMany(s => s.SubPatterns).OfType<IsPatternExpressionSyntax>().ToArray();\n             Assert.Equal(1, propPats.Length);\n \n-            var p = propPats[0]; // Property is 4\n+            var p = propPats[0].Expression; // 'Property' in \"Property is 4\"\n             var si = model.GetSymbolInfo(p);\n             Assert.Null(si.Symbol);\n             Assert.Equal(CandidateReason.Ambiguous, si.CandidateReason);\n-            // Assert.Equal(2, si.CandidateSymbols.Length); // skipped due to https://github.com/dotnet/roslyn/issues/9284\n+            Assert.Equal(2, si.CandidateSymbols.Length);\n+            Assert.Equal(\"I1\", si.CandidateSymbols[0].ContainingSymbol.Name);\n+            Assert.Equal(\"I2\", si.CandidateSymbols[1].ContainingSymbol.Name);\n+        }\n+\n+        [Fact(Skip = \"https://github.com/dotnet/roslyn/issues/9284\"), WorkItem(9284, \"https://github.com/dotnet/roslyn/issues/9284\")]\n+        public void StaticNamedProperty()\n+        {\n+            var source =\n+@\"\n+using System;\n+public class Program\n+{\n+    public static void Main()\n+    {\n+        object o = null;\n+        Console.WriteLine(o is Point { X is 4 });\n+    }\n+}\n+class Point\n+{\n+    public static int X => 0;\n+}\n+\";\n+            var compilation = CreateCompilationWithMscorlib45(source, options: TestOptions.DebugExe, parseOptions: patternParseOptions);\n+\n+            // TODO: need a better diagnostic for this\n+            compilation.VerifyDiagnostics(\n+                // (8,40): error CS0176: Member 'Point.X' cannot be accessed with an instance reference; qualify it with a type name instead\n+                //         Console.WriteLine(o is Point { X is 4 });\n+                Diagnostic(ErrorCode.ERR_ObjectProhibited, \"X\").WithArguments(\"Point.X\").WithLocation(8, 40)\n+                );\n+            var tree = compilation.SyntaxTrees.Single();\n+            var model = compilation.GetSemanticModel(tree);\n+            var propPats = tree.GetRoot().DescendantNodes().OfType<PropertyPatternSyntax>().SelectMany(s => s.SubPatterns).OfType<IsPatternExpressionSyntax>().ToArray();\n+            Assert.Equal(1, propPats.Length);\n+\n+            var p = propPats[0].Expression; // 'X' in \"X is 4\"\n+            var si = model.GetSymbolInfo(p);\n+            Assert.Null(si.Symbol);\n+            Assert.Equal(1, si.CandidateSymbols.Length);\n+            Assert.Equal(CandidateReason.StaticInstanceMismatch, si.CandidateReason);\n+        }\n+\n+        [Fact]\n+        public void InaccessibleNamedProperty()\n+        {\n+            var source =\n+@\"\n+using System;\n+public class Program\n+{\n+    public static void Main()\n+    {\n+        object o = null;\n+        Console.WriteLine(o is Point { X is 4 });\n+    }\n+}\n+class Point\n+{\n+    protected int X => 0;\n+}\n+\";\n+            var compilation = CreateCompilationWithMscorlib45(source, options: TestOptions.DebugExe, parseOptions: patternParseOptions);\n+\n+            // TODO: need a better diagnostic for this\n+            compilation.VerifyDiagnostics(\n+                // (8,40): error CS0122: 'Point.X' is inaccessible due to its protection level\n+                //         Console.WriteLine(o is Point { X is 4 });\n+                Diagnostic(ErrorCode.ERR_BadAccess, \"X\").WithArguments(\"Point.X\").WithLocation(8, 40)\n+                );\n+            var tree = compilation.SyntaxTrees.Single();\n+            var model = compilation.GetSemanticModel(tree);\n+            var propPats = tree.GetRoot().DescendantNodes().OfType<PropertyPatternSyntax>().SelectMany(s => s.SubPatterns).OfType<IsPatternExpressionSyntax>().ToArray();\n+            Assert.Equal(1, propPats.Length);\n+\n+            var p = propPats[0].Expression; // 'X' in \"X is 4\"\n+            var si = model.GetSymbolInfo(p);\n+            Assert.Null(si.Symbol);\n+            Assert.Equal(1, si.CandidateSymbols.Length);\n+            Assert.Equal(CandidateReason.Inaccessible, si.CandidateReason);","path":"src/Compilers/CSharp/Test/Semantic/Semantics/PatternMatchingTests.cs","position":191,"original_position":191,"commit_id":"eba2520da07d12797b2babdbd223e707e5a9d629","original_commit_id":"eba2520da07d12797b2babdbd223e707e5a9d629","user":{"login":"gafter","id":3804346,"avatar_url":"https://avatars.githubusercontent.com/u/3804346?v=3","gravatar_id":"","url":"https://api.github.com/users/gafter","html_url":"https://github.com/gafter","followers_url":"https://api.github.com/users/gafter/followers","following_url":"https://api.github.com/users/gafter/following{/other_user}","gists_url":"https://api.github.com/users/gafter/gists{/gist_id}","starred_url":"https://api.github.com/users/gafter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gafter/subscriptions","organizations_url":"https://api.github.com/users/gafter/orgs","repos_url":"https://api.github.com/users/gafter/repos","events_url":"https://api.github.com/users/gafter/events{/privacy}","received_events_url":"https://api.github.com/users/gafter/received_events","type":"User","site_admin":false},"body":"OK","created_at":"2016-03-07T23:14:51Z","updated_at":"2016-03-07T23:14:51Z","html_url":"https://github.com/dotnet/roslyn/pull/9505#discussion_r55290712","pull_request_url":"https://api.github.com/repos/dotnet/roslyn/pulls/9505","_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/55290712"},"html":{"href":"https://github.com/dotnet/roslyn/pull/9505#discussion_r55290712"},"pull_request":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/9505"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/9505","id":61789892,"html_url":"https://github.com/dotnet/roslyn/pull/9505","diff_url":"https://github.com/dotnet/roslyn/pull/9505.diff","patch_url":"https://github.com/dotnet/roslyn/pull/9505.patch","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/9505","number":9505,"state":"open","locked":false,"title":"Revise the shape of the syntax trees for property patterns","user":{"login":"gafter","id":3804346,"avatar_url":"https://avatars.githubusercontent.com/u/3804346?v=3","gravatar_id":"","url":"https://api.github.com/users/gafter","html_url":"https://github.com/gafter","followers_url":"https://api.github.com/users/gafter/followers","following_url":"https://api.github.com/users/gafter/following{/other_user}","gists_url":"https://api.github.com/users/gafter/gists{/gist_id}","starred_url":"https://api.github.com/users/gafter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gafter/subscriptions","organizations_url":"https://api.github.com/users/gafter/orgs","repos_url":"https://api.github.com/users/gafter/repos","events_url":"https://api.github.com/users/gafter/events{/privacy}","received_events_url":"https://api.github.com/users/gafter/received_events","type":"User","site_admin":false},"body":"Fixes #9371\r\nRelated to #9284 \r\n\r\n@CyrusNajmabadi This should unblock the IDE work. Please review.\r\n@AlekseyTs @jaredpar Please review\r\n@dotnet/roslyn-compiler FYI","created_at":"2016-03-05T00:02:59Z","updated_at":"2016-03-07T23:14:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9146ef015bffea7cdc894a743b2bdf442b81c574","assignee":{"login":"gafter","id":3804346,"avatar_url":"https://avatars.githubusercontent.com/u/3804346?v=3","gravatar_id":"","url":"https://api.github.com/users/gafter","html_url":"https://github.com/gafter","followers_url":"https://api.github.com/users/gafter/followers","following_url":"https://api.github.com/users/gafter/following{/other_user}","gists_url":"https://api.github.com/users/gafter/gists{/gist_id}","starred_url":"https://api.github.com/users/gafter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gafter/subscriptions","organizations_url":"https://api.github.com/users/gafter/orgs","repos_url":"https://api.github.com/users/gafter/repos","events_url":"https://api.github.com/users/gafter/events{/privacy}","received_events_url":"https://api.github.com/users/gafter/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/dotnet/roslyn/milestones/11","html_url":"https://github.com/dotnet/roslyn/milestones/2.0%20(Preview)","labels_url":"https://api.github.com/repos/dotnet/roslyn/milestones/11/labels","id":1109349,"number":11,"title":"2.0 (Preview)","description":"The next major version.","creator":{"login":"gafter","id":3804346,"avatar_url":"https://avatars.githubusercontent.com/u/3804346?v=3","gravatar_id":"","url":"https://api.github.com/users/gafter","html_url":"https://github.com/gafter","followers_url":"https://api.github.com/users/gafter/followers","following_url":"https://api.github.com/users/gafter/following{/other_user}","gists_url":"https://api.github.com/users/gafter/gists{/gist_id}","starred_url":"https://api.github.com/users/gafter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gafter/subscriptions","organizations_url":"https://api.github.com/users/gafter/orgs","repos_url":"https://api.github.com/users/gafter/repos","events_url":"https://api.github.com/users/gafter/events{/privacy}","received_events_url":"https://api.github.com/users/gafter/received_events","type":"User","site_admin":false},"open_issues":264,"closed_issues":56,"state":"open","created_at":"2015-05-13T22:28:30Z","updated_at":"2016-03-07T19:03:42Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/dotnet/roslyn/pulls/9505/commits","review_comments_url":"https://api.github.com/repos/dotnet/roslyn/pulls/9505/comments","review_comment_url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/9505/comments","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/eba2520da07d12797b2babdbd223e707e5a9d629","head":{"label":"gafter:patterns-9371","ref":"patterns-9371","sha":"eba2520da07d12797b2babdbd223e707e5a9d629","user":{"login":"gafter","id":3804346,"avatar_url":"https://avatars.githubusercontent.com/u/3804346?v=3","gravatar_id":"","url":"https://api.github.com/users/gafter","html_url":"https://github.com/gafter","followers_url":"https://api.github.com/users/gafter/followers","following_url":"https://api.github.com/users/gafter/following{/other_user}","gists_url":"https://api.github.com/users/gafter/gists{/gist_id}","starred_url":"https://api.github.com/users/gafter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gafter/subscriptions","organizations_url":"https://api.github.com/users/gafter/orgs","repos_url":"https://api.github.com/users/gafter/repos","events_url":"https://api.github.com/users/gafter/events{/privacy}","received_events_url":"https://api.github.com/users/gafter/received_events","type":"User","site_admin":false},"repo":{"id":30125216,"name":"roslyn","full_name":"gafter/roslyn","owner":{"login":"gafter","id":3804346,"avatar_url":"https://avatars.githubusercontent.com/u/3804346?v=3","gravatar_id":"","url":"https://api.github.com/users/gafter","html_url":"https://github.com/gafter","followers_url":"https://api.github.com/users/gafter/followers","following_url":"https://api.github.com/users/gafter/following{/other_user}","gists_url":"https://api.github.com/users/gafter/gists{/gist_id}","starred_url":"https://api.github.com/users/gafter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gafter/subscriptions","organizations_url":"https://api.github.com/users/gafter/orgs","repos_url":"https://api.github.com/users/gafter/repos","events_url":"https://api.github.com/users/gafter/events{/privacy}","received_events_url":"https://api.github.com/users/gafter/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gafter/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/gafter/roslyn","forks_url":"https://api.github.com/repos/gafter/roslyn/forks","keys_url":"https://api.github.com/repos/gafter/roslyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gafter/roslyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gafter/roslyn/teams","hooks_url":"https://api.github.com/repos/gafter/roslyn/hooks","issue_events_url":"https://api.github.com/repos/gafter/roslyn/issues/events{/number}","events_url":"https://api.github.com/repos/gafter/roslyn/events","assignees_url":"https://api.github.com/repos/gafter/roslyn/assignees{/user}","branches_url":"https://api.github.com/repos/gafter/roslyn/branches{/branch}","tags_url":"https://api.github.com/repos/gafter/roslyn/tags","blobs_url":"https://api.github.com/repos/gafter/roslyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gafter/roslyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gafter/roslyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/gafter/roslyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gafter/roslyn/statuses/{sha}","languages_url":"https://api.github.com/repos/gafter/roslyn/languages","stargazers_url":"https://api.github.com/repos/gafter/roslyn/stargazers","contributors_url":"https://api.github.com/repos/gafter/roslyn/contributors","subscribers_url":"https://api.github.com/repos/gafter/roslyn/subscribers","subscription_url":"https://api.github.com/repos/gafter/roslyn/subscription","commits_url":"https://api.github.com/repos/gafter/roslyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/gafter/roslyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/gafter/roslyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/gafter/roslyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/gafter/roslyn/contents/{+path}","compare_url":"https://api.github.com/repos/gafter/roslyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gafter/roslyn/merges","archive_url":"https://api.github.com/repos/gafter/roslyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gafter/roslyn/downloads","issues_url":"https://api.github.com/repos/gafter/roslyn/issues{/number}","pulls_url":"https://api.github.com/repos/gafter/roslyn/pulls{/number}","milestones_url":"https://api.github.com/repos/gafter/roslyn/milestones{/number}","notifications_url":"https://api.github.com/repos/gafter/roslyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gafter/roslyn/labels{/name}","releases_url":"https://api.github.com/repos/gafter/roslyn/releases{/id}","deployments_url":"https://api.github.com/repos/gafter/roslyn/deployments","created_at":"2015-01-31T20:26:12Z","updated_at":"2016-02-18T04:08:14Z","pushed_at":"2016-03-07T21:48:25Z","git_url":"git://github.com/gafter/roslyn.git","ssh_url":"git@github.com:gafter/roslyn.git","clone_url":"https://github.com/gafter/roslyn.git","svn_url":"https://github.com/gafter/roslyn","homepage":"","size":138328,"stargazers_count":1,"watchers_count":1,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"dotnet:features/patterns","ref":"features/patterns","sha":"4e8d8737fade720a267eb6681b19f72964f02739","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-07T22:25:56Z","pushed_at":"2016-03-07T22:51:21Z","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":166575,"stargazers_count":4584,"watchers_count":4584,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1150,"mirror_url":null,"open_issues_count":2389,"forks":1150,"open_issues":2389,"watchers":4584,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/9505"},"html":{"href":"https://github.com/dotnet/roslyn/pull/9505"},"issue":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/9505"},"comments":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/9505/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/9505/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/9505/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/roslyn/statuses/eba2520da07d12797b2babdbd223e707e5a9d629"}}}}