{"action":"closed","issue":{"url":"https://api.github.com/repos/icsharpcode/ILSpy/issues/746","repository_url":"https://api.github.com/repos/icsharpcode/ILSpy","labels_url":"https://api.github.com/repos/icsharpcode/ILSpy/issues/746/labels{/name}","comments_url":"https://api.github.com/repos/icsharpcode/ILSpy/issues/746/comments","events_url":"https://api.github.com/repos/icsharpcode/ILSpy/issues/746/events","html_url":"https://github.com/icsharpcode/ILSpy/issues/746","id":169721851,"number":746,"title":"Parameter Overload","user":{"login":"FlorianGrimm","id":2593674,"avatar_url":"https://avatars0.githubusercontent.com/u/2593674?v=4","gravatar_id":"","url":"https://api.github.com/users/FlorianGrimm","html_url":"https://github.com/FlorianGrimm","followers_url":"https://api.github.com/users/FlorianGrimm/followers","following_url":"https://api.github.com/users/FlorianGrimm/following{/other_user}","gists_url":"https://api.github.com/users/FlorianGrimm/gists{/gist_id}","starred_url":"https://api.github.com/users/FlorianGrimm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FlorianGrimm/subscriptions","organizations_url":"https://api.github.com/users/FlorianGrimm/orgs","repos_url":"https://api.github.com/users/FlorianGrimm/repos","events_url":"https://api.github.com/users/FlorianGrimm/events{/privacy}","received_events_url":"https://api.github.com/users/FlorianGrimm/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/icsharpcode/ILSpy/milestones/5","html_url":"https://github.com/icsharpcode/ILSpy/milestone/5","labels_url":"https://api.github.com/repos/icsharpcode/ILSpy/milestones/5/labels","id":1011092,"number":5,"title":"3.0","description":"Major version with new decompiler engine based on NRefactory 5 TypeSystem","creator":{"login":"siegfriedpammer","id":344204,"avatar_url":"https://avatars3.githubusercontent.com/u/344204?v=4","gravatar_id":"","url":"https://api.github.com/users/siegfriedpammer","html_url":"https://github.com/siegfriedpammer","followers_url":"https://api.github.com/users/siegfriedpammer/followers","following_url":"https://api.github.com/users/siegfriedpammer/following{/other_user}","gists_url":"https://api.github.com/users/siegfriedpammer/gists{/gist_id}","starred_url":"https://api.github.com/users/siegfriedpammer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/siegfriedpammer/subscriptions","organizations_url":"https://api.github.com/users/siegfriedpammer/orgs","repos_url":"https://api.github.com/users/siegfriedpammer/repos","events_url":"https://api.github.com/users/siegfriedpammer/events{/privacy}","received_events_url":"https://api.github.com/users/siegfriedpammer/received_events","type":"User","site_admin":false},"open_issues":52,"closed_issues":55,"state":"open","created_at":"2015-03-08T07:38:38Z","updated_at":"2017-09-14T19:39:20Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2016-08-06T01:15:25Z","updated_at":"2017-09-14T19:39:20Z","closed_at":"2017-09-14T19:39:20Z","author_association":"NONE","body":"If a Method exist with Overload with type and base type wrong code is generated\n`\nusing System;\nnamespace TestParameter {\n    public class Program  {\n        public static void Main(string[] args)   {\n            var b = new B();\n/**/\n            System.Console.Out.WriteLine(b.M(b) + b.M((A)b) + b.M((object)b));\n/**/\n        }\n    }\n    public class A    {\n        public virtual int M(Object a) { return 1; }\n        public virtual int M(A a) { return 2; }\n    }\n    public class B : A    {        public virtual int M(B b) { return 4; }    }\n}\n`\n\nwill be decompiled to\n`Console.Out.WriteLine(b.M(b) + b.M(b) + b.M(b));`\n\nI'll tried to fix it within ICSharpCode.Decompiler\\Ast\\AstMethodBodyBuilder.cs convert return expr.CastTo(AstBuilder.ConvertType(reqType)); but that's too much.. and I'll don't know enough about IL and the process of decompiling..\n"}}
{"actor":{"display_login":"dgrunwald"}}