{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/15810","repository_url":"https://api.github.com/repos/dotnet/roslyn","labels_url":"https://api.github.com/repos/dotnet/roslyn/issues/15810/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/15810/comments","events_url":"https://api.github.com/repos/dotnet/roslyn/issues/15810/events","html_url":"https://github.com/dotnet/roslyn/issues/15810","id":194690355,"number":15810,"title":"First-class generic method / First-class polymorphism / Rank-N types","user":{"login":"be5invis","id":240091,"avatar_url":"https://avatars.githubusercontent.com/u/240091?v=3","gravatar_id":"","url":"https://api.github.com/users/be5invis","html_url":"https://github.com/be5invis","followers_url":"https://api.github.com/users/be5invis/followers","following_url":"https://api.github.com/users/be5invis/following{/other_user}","gists_url":"https://api.github.com/users/be5invis/gists{/gist_id}","starred_url":"https://api.github.com/users/be5invis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/be5invis/subscriptions","organizations_url":"https://api.github.com/users/be5invis/orgs","repos_url":"https://api.github.com/users/be5invis/repos","events_url":"https://api.github.com/users/be5invis/events{/privacy}","received_events_url":"https://api.github.com/users/be5invis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-09T20:33:46Z","updated_at":"2016-12-10T09:05:53Z","closed_at":null,"body":"Given that we have\r\n```C#\r\nprivate void GenericMethod<T, U>(T obj, U parm1)\r\n```\r\nWhich we can use like so:\r\n```C#\r\nGenericMethod(\"test\", 1);\r\nGenericMethod(42, \"hello world!\");\r\nGenericMethod(1.2345, \"etc.\");\r\n```\r\n... but it is impossible for now to do this:\r\n```C#\r\npublic void AnotherMethod(Action<???> method) {\r\n    method(\"test\", 1);\r\n    method(42, \"hello world!\");\r\n    method(1.2345, \"etc.\");\r\n}\r\n//...\r\nAnotherMethod(GenericMethod);\r\n```\r\n...without using reflection/dynamic tricks.\r\n\r\nWhat if we have a `forall`?\r\n```C#\r\npublic void AnotherMethod(forall<T, U>. Action<T, U> method) {\r\n    method(\"test\", 1);\r\n    method(42, \"hello world!\");\r\n    method(1.2345, \"etc.\");\r\n}\r\n//...\r\nAnotherMethod(GenericMethod);\r\n```"},"comment":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/comments/266191224","html_url":"https://github.com/dotnet/roslyn/issues/15810#issuecomment-266191224","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/15810","id":266191224,"user":{"login":"orthoxerox","id":8640149,"avatar_url":"https://avatars.githubusercontent.com/u/8640149?v=3","gravatar_id":"","url":"https://api.github.com/users/orthoxerox","html_url":"https://github.com/orthoxerox","followers_url":"https://api.github.com/users/orthoxerox/followers","following_url":"https://api.github.com/users/orthoxerox/following{/other_user}","gists_url":"https://api.github.com/users/orthoxerox/gists{/gist_id}","starred_url":"https://api.github.com/users/orthoxerox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orthoxerox/subscriptions","organizations_url":"https://api.github.com/users/orthoxerox/orgs","repos_url":"https://api.github.com/users/orthoxerox/repos","events_url":"https://api.github.com/users/orthoxerox/events{/privacy}","received_events_url":"https://api.github.com/users/orthoxerox/received_events","type":"User","site_admin":false},"created_at":"2016-12-10T09:05:53Z","updated_at":"2016-12-10T09:05:53Z","body":"See also #2212"}}
{"actor":{"display_login":"orthoxerox"}}