{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/15960","repository_url":"https://api.github.com/repos/dotnet/corefx","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/15960/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/15960/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/15960/events","html_url":"https://github.com/dotnet/corefx/issues/15960","id":206332105,"number":15960,"title":"Existing reflection APIs should be able to invoke ref-returning methods and return a value","user":{"login":"VSadov","id":8218165,"avatar_url":"https://avatars0.githubusercontent.com/u/8218165?v=4","gravatar_id":"","url":"https://api.github.com/users/VSadov","html_url":"https://github.com/VSadov","followers_url":"https://api.github.com/users/VSadov/followers","following_url":"https://api.github.com/users/VSadov/following{/other_user}","gists_url":"https://api.github.com/users/VSadov/gists{/gist_id}","starred_url":"https://api.github.com/users/VSadov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VSadov/subscriptions","organizations_url":"https://api.github.com/users/VSadov/orgs","repos_url":"https://api.github.com/users/VSadov/repos","events_url":"https://api.github.com/users/VSadov/events{/privacy}","received_events_url":"https://api.github.com/users/VSadov/received_events","type":"User","site_admin":false},"labels":[{"id":153714228,"url":"https://api.github.com/repos/dotnet/corefx/labels/api-needs-work","name":"api-needs-work","color":"207de5","default":false},{"id":175424040,"url":"https://api.github.com/repos/dotnet/corefx/labels/area-System.Reflection","name":"area-System.Reflection","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":{"login":"AtsushiKan","id":13223578,"avatar_url":"https://avatars0.githubusercontent.com/u/13223578?v=4","gravatar_id":"","url":"https://api.github.com/users/AtsushiKan","html_url":"https://github.com/AtsushiKan","followers_url":"https://api.github.com/users/AtsushiKan/followers","following_url":"https://api.github.com/users/AtsushiKan/following{/other_user}","gists_url":"https://api.github.com/users/AtsushiKan/gists{/gist_id}","starred_url":"https://api.github.com/users/AtsushiKan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AtsushiKan/subscriptions","organizations_url":"https://api.github.com/users/AtsushiKan/orgs","repos_url":"https://api.github.com/users/AtsushiKan/repos","events_url":"https://api.github.com/users/AtsushiKan/events{/privacy}","received_events_url":"https://api.github.com/users/AtsushiKan/received_events","type":"User","site_admin":false},"assignees":[{"login":"AtsushiKan","id":13223578,"avatar_url":"https://avatars0.githubusercontent.com/u/13223578?v=4","gravatar_id":"","url":"https://api.github.com/users/AtsushiKan","html_url":"https://github.com/AtsushiKan","followers_url":"https://api.github.com/users/AtsushiKan/followers","following_url":"https://api.github.com/users/AtsushiKan/following{/other_user}","gists_url":"https://api.github.com/users/AtsushiKan/gists{/gist_id}","starred_url":"https://api.github.com/users/AtsushiKan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AtsushiKan/subscriptions","organizations_url":"https://api.github.com/users/AtsushiKan/orgs","repos_url":"https://api.github.com/users/AtsushiKan/repos","events_url":"https://api.github.com/users/AtsushiKan/events{/privacy}","received_events_url":"https://api.github.com/users/AtsushiKan/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/dotnet/corefx/milestones/21","html_url":"https://github.com/dotnet/corefx/milestone/21","labels_url":"https://api.github.com/repos/dotnet/corefx/milestones/21/labels","id":3242632,"number":21,"title":"2.2.0","description":"Placeholder name for next major release after 2.1. [Official release dates](https://github.com/dotnet/core/blob/master/roadmap.md) are TBD.\r\n\r\nWe will move important issues from Future to 2.2.0 as the priorities and dates for next release become more clear.","creator":{"login":"karelz","id":5776068,"avatar_url":"https://avatars2.githubusercontent.com/u/5776068?v=4","gravatar_id":"","url":"https://api.github.com/users/karelz","html_url":"https://github.com/karelz","followers_url":"https://api.github.com/users/karelz/followers","following_url":"https://api.github.com/users/karelz/following{/other_user}","gists_url":"https://api.github.com/users/karelz/gists{/gist_id}","starred_url":"https://api.github.com/users/karelz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karelz/subscriptions","organizations_url":"https://api.github.com/users/karelz/orgs","repos_url":"https://api.github.com/users/karelz/repos","events_url":"https://api.github.com/users/karelz/events{/privacy}","received_events_url":"https://api.github.com/users/karelz/received_events","type":"User","site_admin":false},"open_issues":35,"closed_issues":4,"state":"open","created_at":"2018-04-04T16:40:10Z","updated_at":"2018-04-10T23:08:48Z","due_on":null,"closed_at":null},"comments":16,"created_at":"2017-02-08T21:36:44Z","updated_at":"2018-04-11T14:47:51Z","closed_at":null,"author_association":"MEMBER","body":"Related to: https://github.com/dotnet/roslyn/issues/8489\r\n\r\nThe scenario seems to be explicitly forbidden. Possibly due to ref returning methods not being common in the past.\r\n\r\nNote that this issue does not ask for a new API that would allow returning a `ref`. \r\n\r\nThis is just about the  existing APIs that returns the result as an object. \r\nIt seems that they should work with ref returning methods by evaluating the target, reading the value indirectly and returning the value as object.\r\n\r\n```C#\r\n\r\nobject result1 = inst.RefReturningMethod();\r\n\r\n// should be the same as \r\nobject result2 = inst.GetType().InvokeMember(inst, . . ., \"RefReturningMethod\",. . .);\r\n```\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/dotnet/corefx/issues/comments/380479516","html_url":"https://github.com/dotnet/corefx/issues/15960#issuecomment-380479516","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/15960","id":380479516,"user":{"login":"AtsushiKan","id":13223578,"avatar_url":"https://avatars0.githubusercontent.com/u/13223578?v=4","gravatar_id":"","url":"https://api.github.com/users/AtsushiKan","html_url":"https://github.com/AtsushiKan","followers_url":"https://api.github.com/users/AtsushiKan/followers","following_url":"https://api.github.com/users/AtsushiKan/following{/other_user}","gists_url":"https://api.github.com/users/AtsushiKan/gists{/gist_id}","starred_url":"https://api.github.com/users/AtsushiKan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AtsushiKan/subscriptions","organizations_url":"https://api.github.com/users/AtsushiKan/orgs","repos_url":"https://api.github.com/users/AtsushiKan/repos","events_url":"https://api.github.com/users/AtsushiKan/events{/privacy}","received_events_url":"https://api.github.com/users/AtsushiKan/received_events","type":"User","site_admin":false},"created_at":"2018-04-11T14:47:51Z","updated_at":"2018-04-11T14:47:51Z","author_association":"MEMBER","body":"DLR and VB latebinders passing through `Missing.Value` to propagate the fact that user did not pass a particular argument to expected optional parameters isn't exactly making it \"mean a different thing.\" The meaning is still \"opted out of passing an optional.\"\r\n\r\nIf we had a properly named sentinel for this (`NullReference.Value`), the api would be both clearer in usage and if people did the same thing and propagated that, it's not a big problem. The main impetus of using `Missing.Value` specifically was to avoid the overhead of an api-review, but we don't need to be constrained by that.\r\n \r\n>I think we pass a ref to the element of the array that the user provided as an argument to Invoke. It's >not so temporary.\r\n\r\nYes, I expect it would survive the call but it's still pretty limiting. I think if we went down that path, we'd be taking the stance that `SetValue` isn't meant to be the all purpose solution for ref-heavy applications.\r\n\r\n"}}
{"actor":{"display_login":"AtsushiKan"}}