{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/coreclr/issues/11865","repository_url":"https://api.github.com/repos/dotnet/coreclr","labels_url":"https://api.github.com/repos/dotnet/coreclr/issues/11865/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/coreclr/issues/11865/comments","events_url":"https://api.github.com/repos/dotnet/coreclr/issues/11865/events","html_url":"https://github.com/dotnet/coreclr/pull/11865","id":230919969,"number":11865,"title":"Disable IEnumerable.GetEnumerator on RCW through IDispatch","user":{"login":"yizhang82","id":6903744,"avatar_url":"https://avatars2.githubusercontent.com/u/6903744?v=3","gravatar_id":"","url":"https://api.github.com/users/yizhang82","html_url":"https://github.com/yizhang82","followers_url":"https://api.github.com/users/yizhang82/followers","following_url":"https://api.github.com/users/yizhang82/following{/other_user}","gists_url":"https://api.github.com/users/yizhang82/gists{/gist_id}","starred_url":"https://api.github.com/users/yizhang82/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yizhang82/subscriptions","organizations_url":"https://api.github.com/users/yizhang82/orgs","repos_url":"https://api.github.com/users/yizhang82/repos","events_url":"https://api.github.com/users/yizhang82/events{/privacy}","received_events_url":"https://api.github.com/users/yizhang82/received_events","type":"User","site_admin":false},"labels":[{"id":197462704,"url":"https://api.github.com/repos/dotnet/coreclr/labels/cla-already-signed","name":"cla-already-signed","color":"009800","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-05-24T04:52:01Z","updated_at":"2017-06-10T05:00:44Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dotnet/coreclr/pulls/11865","html_url":"https://github.com/dotnet/coreclr/pull/11865","diff_url":"https://github.com/dotnet/coreclr/pull/11865.diff","patch_url":"https://github.com/dotnet/coreclr/pull/11865.patch"},"body":"CoreCLR doesn't really support IDispatch and this is probably one of the more obscure cases that we don't block it properly. When calling IEnumerable.GetEnumerator, we will try 3 possibilities (IBindableIterable, IIterable<T>, and IDispatch.Invoke with DISPID_NEWENUM). When we go through the last one we end up going through EnumerableToDispatchMarshaler code (which is implemented in C++/CLI for whatever reason) using ComTypes.IEnumerable and both of these are currently missing. We can revisit IDispatch support at some point in the future but for now it's good to be consistent.\r\n\r\nThis makes sure we throw a good error message:\r\n \r\nException caught from 'GetEnumerator()': IDispatch and IDispatchEx are not supported\r\nStackTrace:\r\n   at System.Collections.IEnumerable.GetEnumerator()\r\n   at COMTest.Program.Main(String[] args) \r\n\r\n@jkotas PTAL"},"comment":{"url":"https://api.github.com/repos/dotnet/coreclr/issues/comments/307542908","html_url":"https://github.com/dotnet/coreclr/pull/11865#issuecomment-307542908","issue_url":"https://api.github.com/repos/dotnet/coreclr/issues/11865","id":307542908,"user":{"login":"danmosemsft","id":6385855,"avatar_url":"https://avatars0.githubusercontent.com/u/6385855?v=3","gravatar_id":"","url":"https://api.github.com/users/danmosemsft","html_url":"https://github.com/danmosemsft","followers_url":"https://api.github.com/users/danmosemsft/followers","following_url":"https://api.github.com/users/danmosemsft/following{/other_user}","gists_url":"https://api.github.com/users/danmosemsft/gists{/gist_id}","starred_url":"https://api.github.com/users/danmosemsft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danmosemsft/subscriptions","organizations_url":"https://api.github.com/users/danmosemsft/orgs","repos_url":"https://api.github.com/users/danmosemsft/repos","events_url":"https://api.github.com/users/danmosemsft/events{/privacy}","received_events_url":"https://api.github.com/users/danmosemsft/received_events","type":"User","site_admin":false},"created_at":"2017-06-10T05:00:44Z","updated_at":"2017-06-10T05:00:44Z","body":"@yizhang82 what is the status of this one?\r\n@dotnet-bot test this please (stalled)"}}
{"actor":{"display_login":"danmosemsft"}}