{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/196999033","pull_request_review_id":130653465,"id":196999033,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5Njk5OTAzMw==","diff_hunk":"@@ -1440,5 +1440,38 @@ static void Main()\n                 Diagnostic(ErrorCode.ERR_BadSKunknown, \"S1\").WithArguments(\"Program.S1\", \"type\").WithLocation(16, 24)\n                 );\n         }\n+\n+        [Fact]\n+        [WorkItem(27874, \"https://github.com/dotnet/roslyn/issues/27874\")]\n+        public void PassingSpansToLocals_EscapeScope()\n+        {\n+            CompileAndVerify(\n+                CreateCompilationWithMscorlibAndSpan(@\"\n+using System;\n+class C\n+{\n+    static void Main()\n+    {\n+        Span<int> x = stackalloc int [10];\n+        \n+        Console.WriteLine(M1(ref x).Length);\n+        Console.WriteLine(M2(ref x).Length);\n+    }\n+    \n+    static ref Span<int> M1(ref Span<int> x)\n+    {\n+        ref Span<int> q = ref x;","path":"src/Compilers/CSharp/Test/Semantic/Semantics/SpanStackSafetyTests.cs","position":24,"original_position":24,"commit_id":"f2791e0e096d7a3b61702b4d6bc4304187e0b240","original_commit_id":"f2791e0e096d7a3b61702b4d6bc4304187e0b240","user":{"login":"jaredpar","id":146967,"node_id":"MDQ6VXNlcjE0Njk2Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/146967?v=4","gravatar_id":"","url":"https://api.github.com/users/jaredpar","html_url":"https://github.com/jaredpar","followers_url":"https://api.github.com/users/jaredpar/followers","following_url":"https://api.github.com/users/jaredpar/following{/other_user}","gists_url":"https://api.github.com/users/jaredpar/gists{/gist_id}","starred_url":"https://api.github.com/users/jaredpar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaredpar/subscriptions","organizations_url":"https://api.github.com/users/jaredpar/orgs","repos_url":"https://api.github.com/users/jaredpar/repos","events_url":"https://api.github.com/users/jaredpar/events{/privacy}","received_events_url":"https://api.github.com/users/jaredpar/received_events","type":"User","site_admin":false},"body":"When `x` is a field though it's always escapable as it has heap lifetime. Or if the container is a struct it's never escapable. I believe we already have tests for those scenarios.","created_at":"2018-06-21T03:04:23Z","updated_at":"2018-06-21T03:04:23Z","html_url":"https://github.com/dotnet/roslyn/pull/27882#discussion_r196999033","pull_request_url":"https://api.github.com/repos/dotnet/roslyn/pulls/27882","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/196999033"},"html":{"href":"https://github.com/dotnet/roslyn/pull/27882#discussion_r196999033"},"pull_request":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/27882"}},"in_reply_to_id":196612679},"pull_request":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/27882","id":195050749,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1MDUwNzQ5","html_url":"https://github.com/dotnet/roslyn/pull/27882","diff_url":"https://github.com/dotnet/roslyn/pull/27882.diff","patch_url":"https://github.com/dotnet/roslyn/pull/27882.patch","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/27882","number":27882,"state":"open","locked":false,"title":"Ref-like type parameters can return safely to external scope by ref","user":{"login":"OmarTawfik","id":15987992,"node_id":"MDQ6VXNlcjE1OTg3OTky","avatar_url":"https://avatars1.githubusercontent.com/u/15987992?v=4","gravatar_id":"","url":"https://api.github.com/users/OmarTawfik","html_url":"https://github.com/OmarTawfik","followers_url":"https://api.github.com/users/OmarTawfik/followers","following_url":"https://api.github.com/users/OmarTawfik/following{/other_user}","gists_url":"https://api.github.com/users/OmarTawfik/gists{/gist_id}","starred_url":"https://api.github.com/users/OmarTawfik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OmarTawfik/subscriptions","organizations_url":"https://api.github.com/users/OmarTawfik/orgs","repos_url":"https://api.github.com/users/OmarTawfik/repos","events_url":"https://api.github.com/users/OmarTawfik/events{/privacy}","received_events_url":"https://api.github.com/users/OmarTawfik/received_events","type":"User","site_admin":false},"body":"Fixes #27874 \r\nFixes #27972","created_at":"2018-06-15T00:24:23Z","updated_at":"2018-06-21T03:04:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"136b2628d2f997a3b2454e49c1f45e9b66975088","assignee":{"login":"OmarTawfik","id":15987992,"node_id":"MDQ6VXNlcjE1OTg3OTky","avatar_url":"https://avatars1.githubusercontent.com/u/15987992?v=4","gravatar_id":"","url":"https://api.github.com/users/OmarTawfik","html_url":"https://github.com/OmarTawfik","followers_url":"https://api.github.com/users/OmarTawfik/followers","following_url":"https://api.github.com/users/OmarTawfik/following{/other_user}","gists_url":"https://api.github.com/users/OmarTawfik/gists{/gist_id}","starred_url":"https://api.github.com/users/OmarTawfik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OmarTawfik/subscriptions","organizations_url":"https://api.github.com/users/OmarTawfik/orgs","repos_url":"https://api.github.com/users/OmarTawfik/repos","events_url":"https://api.github.com/users/OmarTawfik/events{/privacy}","received_events_url":"https://api.github.com/users/OmarTawfik/received_events","type":"User","site_admin":false},"assignees":[{"login":"OmarTawfik","id":15987992,"node_id":"MDQ6VXNlcjE1OTg3OTky","avatar_url":"https://avatars1.githubusercontent.com/u/15987992?v=4","gravatar_id":"","url":"https://api.github.com/users/OmarTawfik","html_url":"https://github.com/OmarTawfik","followers_url":"https://api.github.com/users/OmarTawfik/followers","following_url":"https://api.github.com/users/OmarTawfik/following{/other_user}","gists_url":"https://api.github.com/users/OmarTawfik/gists{/gist_id}","starred_url":"https://api.github.com/users/OmarTawfik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OmarTawfik/subscriptions","organizations_url":"https://api.github.com/users/OmarTawfik/orgs","repos_url":"https://api.github.com/users/OmarTawfik/repos","events_url":"https://api.github.com/users/OmarTawfik/events{/privacy}","received_events_url":"https://api.github.com/users/OmarTawfik/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"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":165001069,"node_id":"MDU6TGFiZWwxNjUwMDEwNjk=","url":"https://api.github.com/repos/dotnet/roslyn/labels/Bug","name":"Bug","color":"e52727","default":false}],"milestone":{"url":"https://api.github.com/repos/dotnet/roslyn/milestones/33","html_url":"https://github.com/dotnet/roslyn/milestone/33","labels_url":"https://api.github.com/repos/dotnet/roslyn/milestones/33/labels","id":3020805,"node_id":"MDk6TWlsZXN0b25lMzAyMDgwNQ==","number":33,"title":"15.8","description":null,"creator":{"login":"sharwell","id":1408396,"node_id":"MDQ6VXNlcjE0MDgzOTY=","avatar_url":"https://avatars1.githubusercontent.com/u/1408396?v=4","gravatar_id":"","url":"https://api.github.com/users/sharwell","html_url":"https://github.com/sharwell","followers_url":"https://api.github.com/users/sharwell/followers","following_url":"https://api.github.com/users/sharwell/following{/other_user}","gists_url":"https://api.github.com/users/sharwell/gists{/gist_id}","starred_url":"https://api.github.com/users/sharwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharwell/subscriptions","organizations_url":"https://api.github.com/users/sharwell/orgs","repos_url":"https://api.github.com/users/sharwell/repos","events_url":"https://api.github.com/users/sharwell/events{/privacy}","received_events_url":"https://api.github.com/users/sharwell/received_events","type":"User","site_admin":false},"open_issues":189,"closed_issues":417,"state":"open","created_at":"2018-01-08T19:35:57Z","updated_at":"2018-06-21T02:24:14Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/dotnet/roslyn/pulls/27882/commits","review_comments_url":"https://api.github.com/repos/dotnet/roslyn/pulls/27882/comments","review_comment_url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/27882/comments","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/f2791e0e096d7a3b61702b4d6bc4304187e0b240","head":{"label":"OmarTawfik:bugs/27874/ref-return-ref-like-types-parameters","ref":"bugs/27874/ref-return-ref-like-types-parameters","sha":"f2791e0e096d7a3b61702b4d6bc4304187e0b240","user":{"login":"OmarTawfik","id":15987992,"node_id":"MDQ6VXNlcjE1OTg3OTky","avatar_url":"https://avatars1.githubusercontent.com/u/15987992?v=4","gravatar_id":"","url":"https://api.github.com/users/OmarTawfik","html_url":"https://github.com/OmarTawfik","followers_url":"https://api.github.com/users/OmarTawfik/followers","following_url":"https://api.github.com/users/OmarTawfik/following{/other_user}","gists_url":"https://api.github.com/users/OmarTawfik/gists{/gist_id}","starred_url":"https://api.github.com/users/OmarTawfik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OmarTawfik/subscriptions","organizations_url":"https://api.github.com/users/OmarTawfik/orgs","repos_url":"https://api.github.com/users/OmarTawfik/repos","events_url":"https://api.github.com/users/OmarTawfik/events{/privacy}","received_events_url":"https://api.github.com/users/OmarTawfik/received_events","type":"User","site_admin":false},"repo":{"id":50976268,"node_id":"MDEwOlJlcG9zaXRvcnk1MDk3NjI2OA==","name":"roslyn","full_name":"OmarTawfik/roslyn","owner":{"login":"OmarTawfik","id":15987992,"node_id":"MDQ6VXNlcjE1OTg3OTky","avatar_url":"https://avatars1.githubusercontent.com/u/15987992?v=4","gravatar_id":"","url":"https://api.github.com/users/OmarTawfik","html_url":"https://github.com/OmarTawfik","followers_url":"https://api.github.com/users/OmarTawfik/followers","following_url":"https://api.github.com/users/OmarTawfik/following{/other_user}","gists_url":"https://api.github.com/users/OmarTawfik/gists{/gist_id}","starred_url":"https://api.github.com/users/OmarTawfik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OmarTawfik/subscriptions","organizations_url":"https://api.github.com/users/OmarTawfik/orgs","repos_url":"https://api.github.com/users/OmarTawfik/repos","events_url":"https://api.github.com/users/OmarTawfik/events{/privacy}","received_events_url":"https://api.github.com/users/OmarTawfik/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/OmarTawfik/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/OmarTawfik/roslyn","forks_url":"https://api.github.com/repos/OmarTawfik/roslyn/forks","keys_url":"https://api.github.com/repos/OmarTawfik/roslyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OmarTawfik/roslyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OmarTawfik/roslyn/teams","hooks_url":"https://api.github.com/repos/OmarTawfik/roslyn/hooks","issue_events_url":"https://api.github.com/repos/OmarTawfik/roslyn/issues/events{/number}","events_url":"https://api.github.com/repos/OmarTawfik/roslyn/events","assignees_url":"https://api.github.com/repos/OmarTawfik/roslyn/assignees{/user}","branches_url":"https://api.github.com/repos/OmarTawfik/roslyn/branches{/branch}","tags_url":"https://api.github.com/repos/OmarTawfik/roslyn/tags","blobs_url":"https://api.github.com/repos/OmarTawfik/roslyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OmarTawfik/roslyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OmarTawfik/roslyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/OmarTawfik/roslyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OmarTawfik/roslyn/statuses/{sha}","languages_url":"https://api.github.com/repos/OmarTawfik/roslyn/languages","stargazers_url":"https://api.github.com/repos/OmarTawfik/roslyn/stargazers","contributors_url":"https://api.github.com/repos/OmarTawfik/roslyn/contributors","subscribers_url":"https://api.github.com/repos/OmarTawfik/roslyn/subscribers","subscription_url":"https://api.github.com/repos/OmarTawfik/roslyn/subscription","commits_url":"https://api.github.com/repos/OmarTawfik/roslyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/OmarTawfik/roslyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/OmarTawfik/roslyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/OmarTawfik/roslyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/OmarTawfik/roslyn/contents/{+path}","compare_url":"https://api.github.com/repos/OmarTawfik/roslyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OmarTawfik/roslyn/merges","archive_url":"https://api.github.com/repos/OmarTawfik/roslyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OmarTawfik/roslyn/downloads","issues_url":"https://api.github.com/repos/OmarTawfik/roslyn/issues{/number}","pulls_url":"https://api.github.com/repos/OmarTawfik/roslyn/pulls{/number}","milestones_url":"https://api.github.com/repos/OmarTawfik/roslyn/milestones{/number}","notifications_url":"https://api.github.com/repos/OmarTawfik/roslyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OmarTawfik/roslyn/labels{/name}","releases_url":"https://api.github.com/repos/OmarTawfik/roslyn/releases{/id}","deployments_url":"https://api.github.com/repos/OmarTawfik/roslyn/deployments","created_at":"2016-02-03T05:25:12Z","updated_at":"2018-06-12T22:43:02Z","pushed_at":"2018-06-20T22:25:14Z","git_url":"git://github.com/OmarTawfik/roslyn.git","ssh_url":"git@github.com:OmarTawfik/roslyn.git","clone_url":"https://github.com/OmarTawfik/roslyn.git","svn_url":"https://github.com/OmarTawfik/roslyn","homepage":"","size":339497,"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":"0f816d5d8daa048f336ef11c51fedbdccbdb330e","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-06-21T02:24:41Z","pushed_at":"2018-06-21T02:24:14Z","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":399207,"stargazers_count":9455,"watchers_count":9455,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2259,"mirror_url":null,"archived":false,"open_issues_count":4942,"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":2259,"open_issues":4942,"watchers":9455,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/27882"},"html":{"href":"https://github.com/dotnet/roslyn/pull/27882"},"issue":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/27882"},"comments":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/27882/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/27882/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/27882/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/roslyn/statuses/f2791e0e096d7a3b61702b4d6bc4304187e0b240"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"jaredpar"}}