{"action":"created","issue":{"url":"https://api.github.com/repos/rsdn/nemerle/issues/581","labels_url":"https://api.github.com/repos/rsdn/nemerle/issues/581/labels{/name}","comments_url":"https://api.github.com/repos/rsdn/nemerle/issues/581/comments","events_url":"https://api.github.com/repos/rsdn/nemerle/issues/581/events","html_url":"https://github.com/rsdn/nemerle/issues/581","id":22021692,"number":581,"title":"Cannot overload on functional types","user":{"login":"NN---","id":580536,"avatar_url":"https://avatars.githubusercontent.com/u/580536?v=3","gravatar_id":"","url":"https://api.github.com/users/NN---","html_url":"https://github.com/NN---","followers_url":"https://api.github.com/users/NN---/followers","following_url":"https://api.github.com/users/NN---/following{/other_user}","gists_url":"https://api.github.com/users/NN---/gists{/gist_id}","starred_url":"https://api.github.com/users/NN---/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NN---/subscriptions","organizations_url":"https://api.github.com/users/NN---/orgs","repos_url":"https://api.github.com/users/NN---/repos","events_url":"https://api.github.com/users/NN---/events{/privacy}","received_events_url":"https://api.github.com/users/NN---/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rsdn/nemerle/labels/Bug","name":"Bug","color":"e10c02"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2013-11-03T15:56:06Z","updated_at":"2015-01-11T15:43:47Z","closed_at":null,"body":"```nemerle\r\nmodule Program\r\n{\r\n  //F[T1](_ : T1 -> void) : void {}\r\n  F[T1,R](_ : T1 -> R) : void {}\r\n  \r\n  Main() : void\r\n  {\r\n    F( (a:int)=>{} );\r\n  }\r\n}\r\n```\r\n\r\n```\r\nerror : cannot use `void' in generic specifier [int, void] of method Program.F(_N_wildcard_3685 : T1 -> R) : void\r\n```\r\n\r\n```nemerle\r\nmodule Program\r\n{\r\n  F[T1](_ : T1 -> void) : void {}\r\n  F[T1,R](_ : T1 -> R) : void {}\r\n  \r\n  Main() : void\r\n  {\r\n    F( (a:int)=>{} );\r\n  }\r\n}\r\n```\r\n\r\n```\r\nerror : typing fails on ambiguity between overloads:\r\nwarning : hint: Posible overload: method Program.F(_N_wildcard_3685 : T1 -> void) : void\r\nwarning : hint: overload definition\r\nwarning : hint: Posible overload: method Program.F(_N_wildcard_3686 : T1 -> R) : void\r\nwarning : hint: overload definition\r\n```\r\n\r\nBut using System.Action/Func everything works:\r\n\r\n```nemerle\r\nmodule Program\r\n{\r\n  F[T1](_ : Action[T1]) : void {}\r\n  F[T1,R](_ : Func[T1, R]) : void {}\r\n  \r\n  Main() : void\r\n  {\r\n    F( (a:int)=>{} );\r\n  }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/rsdn/nemerle/issues/comments/69498624","html_url":"https://github.com/rsdn/nemerle/issues/581#issuecomment-69498624","issue_url":"https://api.github.com/repos/rsdn/nemerle/issues/581","id":69498624,"user":{"login":"NN---","id":580536,"avatar_url":"https://avatars.githubusercontent.com/u/580536?v=3","gravatar_id":"","url":"https://api.github.com/users/NN---","html_url":"https://github.com/NN---","followers_url":"https://api.github.com/users/NN---/followers","following_url":"https://api.github.com/users/NN---/following{/other_user}","gists_url":"https://api.github.com/users/NN---/gists{/gist_id}","starred_url":"https://api.github.com/users/NN---/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NN---/subscriptions","organizations_url":"https://api.github.com/users/NN---/orgs","repos_url":"https://api.github.com/users/NN---/repos","events_url":"https://api.github.com/users/NN---/events{/privacy}","received_events_url":"https://api.github.com/users/NN---/received_events","type":"User","site_admin":false},"created_at":"2015-01-11T15:43:47Z","updated_at":"2015-01-11T15:43:47Z","body":"Nemerle has its own functional type since it is invented before System.Func and System.Action came into play.\r\nThere is Nemerle.Internal.Function and Nemerle.Internal.FunctionVoid which are represented by syntax typeparams -> returntype  .\r\n\r\nThere is an automatic conversion from and to CLR functional types this why it works for them, but for some reason the same algorithm is not implemented for Nemerle own functional types."}}