{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/10451","repository_url":"https://api.github.com/repos/dotnet/corefx","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/10451/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/10451/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/10451/events","html_url":"https://github.com/dotnet/corefx/issues/10451","id":168447737,"number":10451,"title":"S.R.CS.Unsafe: Add unsafe operations for ref returns and locals","user":{"login":"jkotas","id":6668460,"avatar_url":"https://avatars.githubusercontent.com/u/6668460?v=3","gravatar_id":"","url":"https://api.github.com/users/jkotas","html_url":"https://github.com/jkotas","followers_url":"https://api.github.com/users/jkotas/followers","following_url":"https://api.github.com/users/jkotas/following{/other_user}","gists_url":"https://api.github.com/users/jkotas/gists{/gist_id}","starred_url":"https://api.github.com/users/jkotas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkotas/subscriptions","organizations_url":"https://api.github.com/users/jkotas/orgs","repos_url":"https://api.github.com/users/jkotas/repos","events_url":"https://api.github.com/users/jkotas/events{/privacy}","received_events_url":"https://api.github.com/users/jkotas/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/corefx/labels/api-needs-work","name":"api-needs-work","color":"207de5"}],"state":"open","locked":false,"assignee":{"login":"jkotas","id":6668460,"avatar_url":"https://avatars.githubusercontent.com/u/6668460?v=3","gravatar_id":"","url":"https://api.github.com/users/jkotas","html_url":"https://github.com/jkotas","followers_url":"https://api.github.com/users/jkotas/followers","following_url":"https://api.github.com/users/jkotas/following{/other_user}","gists_url":"https://api.github.com/users/jkotas/gists{/gist_id}","starred_url":"https://api.github.com/users/jkotas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkotas/subscriptions","organizations_url":"https://api.github.com/users/jkotas/orgs","repos_url":"https://api.github.com/users/jkotas/repos","events_url":"https://api.github.com/users/jkotas/events{/privacy}","received_events_url":"https://api.github.com/users/jkotas/received_events","type":"User","site_admin":false},"assignees":[{"login":"jkotas","id":6668460,"avatar_url":"https://avatars.githubusercontent.com/u/6668460?v=3","gravatar_id":"","url":"https://api.github.com/users/jkotas","html_url":"https://github.com/jkotas","followers_url":"https://api.github.com/users/jkotas/followers","following_url":"https://api.github.com/users/jkotas/following{/other_user}","gists_url":"https://api.github.com/users/jkotas/gists{/gist_id}","starred_url":"https://api.github.com/users/jkotas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkotas/subscriptions","organizations_url":"https://api.github.com/users/jkotas/orgs","repos_url":"https://api.github.com/users/jkotas/repos","events_url":"https://api.github.com/users/jkotas/events{/privacy}","received_events_url":"https://api.github.com/users/jkotas/received_events","type":"User","site_admin":false}],"milestone":null,"comments":39,"created_at":"2016-07-30T04:04:30Z","updated_at":"2016-08-02T00:35:37Z","closed_at":null,"body":"Roslyn is adding support for ref returns and locals (https://github.com/dotnet/roslyn/issues/118). S.R.CS.Unsafe should provide operations that allow taking advantage of ref returns and locals in unsafe code.\r\n\r\n```\r\npublic static class Unsafe\r\n{\r\n    // Reinterprets the given reference as a reference to a value of type U\r\n    public static ref U AsRef<T, U>(ref T source);\r\n\r\n    // Add offset to the given reference.\r\n    public static ref T RefAdd<T>(ref T pointer, int offset);\r\n\r\n    // Determines whether the specified references point to the same location.\r\n    public static bool RefEquals<T>(ref T refA, ref T refB);\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/dotnet/corefx/issues/comments/236754027","html_url":"https://github.com/dotnet/corefx/issues/10451#issuecomment-236754027","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/10451","id":236754027,"user":{"login":"VSadov","id":8218165,"avatar_url":"https://avatars.githubusercontent.com/u/8218165?v=3","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},"created_at":"2016-08-02T00:35:37Z","updated_at":"2016-08-02T00:35:37Z","body":"@jamesqo - I did not realize that Unsafe is already existing class and has something in it.\r\nAnyways, it is just a suggestion. It could be implemented with a different name or not at all. \r\nThe updated proposal seems good enough actually. \r\n\r\nNot having to specify two types in 'As' would have mostly an aesthetical value. In reality you are still supplying two type arguments, just by splitting them between type/method you could let the compiler to infer the TFrom one from the argument."}}
{"actor":{"display_login":"VSadov"}}