{"action":"created","issue":{"url":"https://api.github.com/repos/hazzik/DelegateDecompiler/issues/107","repository_url":"https://api.github.com/repos/hazzik/DelegateDecompiler","labels_url":"https://api.github.com/repos/hazzik/DelegateDecompiler/issues/107/labels{/name}","comments_url":"https://api.github.com/repos/hazzik/DelegateDecompiler/issues/107/comments","events_url":"https://api.github.com/repos/hazzik/DelegateDecompiler/issues/107/events","html_url":"https://github.com/hazzik/DelegateDecompiler/issues/107","id":238449617,"number":107,"title":"Exception occured as \"Argument types do not match\"","user":{"login":"jxw00100","id":9249036,"avatar_url":"https://avatars2.githubusercontent.com/u/9249036?v=4","gravatar_id":"","url":"https://api.github.com/users/jxw00100","html_url":"https://github.com/jxw00100","followers_url":"https://api.github.com/users/jxw00100/followers","following_url":"https://api.github.com/users/jxw00100/following{/other_user}","gists_url":"https://api.github.com/users/jxw00100/gists{/gist_id}","starred_url":"https://api.github.com/users/jxw00100/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jxw00100/subscriptions","organizations_url":"https://api.github.com/users/jxw00100/orgs","repos_url":"https://api.github.com/users/jxw00100/repos","events_url":"https://api.github.com/users/jxw00100/events{/privacy}","received_events_url":"https://api.github.com/users/jxw00100/received_events","type":"User","site_admin":false},"labels":[{"id":16892511,"url":"https://api.github.com/repos/hazzik/DelegateDecompiler/labels/bug","name":"bug","color":"fc2929","default":true},{"id":668186239,"url":"https://api.github.com/repos/hazzik/DelegateDecompiler/labels/up-for-grabs","name":"up-for-grabs","color":"c5def5","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-06-26T06:12:38Z","updated_at":"2017-12-22T17:04:49Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\nI recently using this wonderful package in my project. However a error happened and blocked my developing. Here is the exception detail:\r\n\r\n> System.ArgumentException was unhandled by user code\r\n>   HResult=-2147024809\r\n>   Message=Argument types do not match\r\n>   Source=System.Core\r\n>   StackTrace:\r\n>        at System.Linq.Expressions.Expression.Condition(Expression test, Expression ifTrue, Expression ifFalse)\r\n>        at DelegateDecompiler.Address.Merge(Expression test, Address address1, Address address2, IDictionary`2 map)\r\n>        at DelegateDecompiler.Processor.ProcessorState.Merge(Expression test, ProcessorState leftState, ProcessorState rightState)\r\n>        at DelegateDecompiler.Processor.<>c__DisplayClass14_0.<ConditionalBranch>b__0()\r\n>        at DelegateDecompiler.Processor.Process()\r\n>        at DelegateDecompiler.Processor.Process(VariableInfo[] locals, IList`1 args, Instruction instruction, Type returnType)\r\n>        at DelegateDecompiler.MethodBodyDecompiler.Decompile(MethodInfo method)\r\n> \r\n>   InnerException: \r\n> \r\n\r\nAfter looking deep inside your source code, i guess the problem is caused in this method \"internal static Expression AdjustType(Expression expression, Type type)\".\r\n\r\nActually, in my case, with the method:\r\nAddress Merge(Expression test, Address address1, Address address2,  IDictionary<Tuple<Address, Address>, Address> map)\" \r\n\r\nthe right expression's type is not same as the left expression' type, but is a derived from it. I believe after the call of \"Processor.AdjustType\", the derived one should be convert (call Expression.Convert) to the other one which is the base type. However, it seems it did nothing after calling \"Processor.AdjustType\" since both of their types are referenced type.\r\n\r\nCan you please have a look?\r\nThanks.\r\n"},"comment":{"url":"https://api.github.com/repos/hazzik/DelegateDecompiler/issues/comments/353638147","html_url":"https://github.com/hazzik/DelegateDecompiler/issues/107#issuecomment-353638147","issue_url":"https://api.github.com/repos/hazzik/DelegateDecompiler/issues/107","id":353638147,"user":{"login":"magicmoux","id":501811,"avatar_url":"https://avatars3.githubusercontent.com/u/501811?v=4","gravatar_id":"","url":"https://api.github.com/users/magicmoux","html_url":"https://github.com/magicmoux","followers_url":"https://api.github.com/users/magicmoux/followers","following_url":"https://api.github.com/users/magicmoux/following{/other_user}","gists_url":"https://api.github.com/users/magicmoux/gists{/gist_id}","starred_url":"https://api.github.com/users/magicmoux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magicmoux/subscriptions","organizations_url":"https://api.github.com/users/magicmoux/orgs","repos_url":"https://api.github.com/users/magicmoux/repos","events_url":"https://api.github.com/users/magicmoux/events{/privacy}","received_events_url":"https://api.github.com/users/magicmoux/received_events","type":"User","site_admin":false},"created_at":"2017-12-22T17:04:49Z","updated_at":"2017-12-22T17:04:49Z","author_association":"NONE","body":"No follow up on this case ? \r\nI could try to include @jxw00100 fix in PR #114 if it passes the tests harness but, if possible, specific unit tests would be welcome anyway.\r\n\r\n"}}
{"actor":{"display_login":"magicmoux"}}