{"action":"closed","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/18062","repository_url":"https://api.github.com/repos/dotnet/corefx","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/18062/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/18062/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/18062/events","html_url":"https://github.com/dotnet/corefx/issues/18062","id":220165986,"number":18062,"title":"Indexing of non-sz single-ranked arrays via dynamic","user":{"login":"JonHanna","id":1253369,"avatar_url":"https://avatars0.githubusercontent.com/u/1253369?v=3","gravatar_id":"","url":"https://api.github.com/users/JonHanna","html_url":"https://github.com/JonHanna","followers_url":"https://api.github.com/users/JonHanna/followers","following_url":"https://api.github.com/users/JonHanna/following{/other_user}","gists_url":"https://api.github.com/users/JonHanna/gists{/gist_id}","starred_url":"https://api.github.com/users/JonHanna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JonHanna/subscriptions","organizations_url":"https://api.github.com/users/JonHanna/orgs","repos_url":"https://api.github.com/users/JonHanna/repos","events_url":"https://api.github.com/users/JonHanna/events{/privacy}","received_events_url":"https://api.github.com/users/JonHanna/received_events","type":"User","site_admin":false},"labels":[{"id":194714831,"url":"https://api.github.com/repos/dotnet/corefx/labels/area-System.Dynamic.Runtime","name":"area-System.Dynamic.Runtime","color":"d4c5f9","default":false},{"id":145399955,"url":"https://api.github.com/repos/dotnet/corefx/labels/bug","name":"bug","color":"207de5","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-04-07T09:53:38Z","updated_at":"2017-04-08T11:19:08Z","closed_at":"2017-04-08T11:19:08Z","body":"See https://github.com/dotnet/corefx/pull/17810#discussion_r109409208 and #18038\r\n\r\nNow that `dynamic` can correctly be used with non-sz single-ranked arrays it can also be *incorrectly* used via indexing. At the time I noticed this behaviour I described it as \"interesting\" but considered that it might not be worth prohibiting as per the description above. I also incorrectly considered that it was consistent with multi-rank non-zero-based behaviour: I'd thought one couldn't index into such arrays in C# all these years, when in fact one can, so allowing such indexing on multi-rank non-zero-based and not on single-rank non-zero-based is not inconsistent with the language.\r\n\r\nIt turns out that such behaviour produces unverifiable code, which breaks on netfx, so we need to either have it work in a verifiable manner or prohibit it. Prohibiting it is probably the best since it's consistent with static C# and there's no risk of breaking code since it wouldn't have worked until a couple of days ago anyway."}}
{"actor":{"display_login":"JonHanna"}}