{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/15644","repository_url":"https://api.github.com/repos/dotnet/roslyn","labels_url":"https://api.github.com/repos/dotnet/roslyn/issues/15644/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/15644/comments","events_url":"https://api.github.com/repos/dotnet/roslyn/issues/15644/events","html_url":"https://github.com/dotnet/roslyn/issues/15644","id":193164974,"number":15644,"title":"Compiler should emit access to auto-prop backing store for access in same compilation unit","user":{"login":"stephentoub","id":2642209,"avatar_url":"https://avatars.githubusercontent.com/u/2642209?v=3","gravatar_id":"","url":"https://api.github.com/users/stephentoub","html_url":"https://github.com/stephentoub","followers_url":"https://api.github.com/users/stephentoub/followers","following_url":"https://api.github.com/users/stephentoub/following{/other_user}","gists_url":"https://api.github.com/users/stephentoub/gists{/gist_id}","starred_url":"https://api.github.com/users/stephentoub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephentoub/subscriptions","organizations_url":"https://api.github.com/users/stephentoub/orgs","repos_url":"https://api.github.com/users/stephentoub/repos","events_url":"https://api.github.com/users/stephentoub/events{/privacy}","received_events_url":"https://api.github.com/users/stephentoub/received_events","type":"User","site_admin":false},"labels":[{"id":166673288,"url":"https://api.github.com/repos/dotnet/roslyn/labels/Area-Compilers","name":"Area-Compilers","color":"5319e7","default":false},{"id":166677091,"url":"https://api.github.com/repos/dotnet/roslyn/labels/Feature%20Request","name":"Feature Request","color":"fc2929","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-12-02T16:54:47Z","updated_at":"2016-12-02T23:28:17Z","closed_at":null,"body":"**Version Used**: \r\n1.3.1.60616\r\n\r\n**Steps to Reproduce**:\r\nCompile:\r\n```C#\r\nclass Test\r\n{\r\n    public static int SomeProp { get; } = 42;\r\n    public static int Main() => SomeProp;\r\n}\r\n```\r\n\r\n**Expected Behavior**:\r\nGenerates the IL for Main:\r\n```\r\n.method public hidebysig static int32  Main() cil managed\r\n{\r\n  .entrypoint\r\n  // Code size       6 (0x6)\r\n  .maxstack  8\r\n  IL_0000:  ldsfld     int32 Test::<SomeProp>k__BackingField\r\n  IL_0005:  ret\r\n} // end of method Test::Main\r\n```\r\n\r\n**Actual Behavior**:\r\nGenerates the IL for Main:\r\n```\r\n.method public hidebysig static int32  Main() cil managed\r\n{\r\n  .entrypoint\r\n  // Code size       6 (0x6)\r\n  .maxstack  8\r\n  IL_0000:  call       int32 Test::get_SomeProp()\r\n  IL_0005:  ret\r\n} // end of method Test::Main\r\n```\r\n\r\nPrimary benefit here would be alleviating a bit of work on the JIT having to inline the accessor, and on avoiding any concern from the developer that such inlining would be done."},"comment":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/comments/264590303","html_url":"https://github.com/dotnet/roslyn/issues/15644#issuecomment-264590303","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/15644","id":264590303,"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},"created_at":"2016-12-02T23:28:17Z","updated_at":"2016-12-02T23:28:17Z","body":"We do not generally do optimizations in the front end."}}
{"actor":{"display_login":"gafter"}}