-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Properties inheritance issue #1949
Comments
Similar issues might be found in public abstract class WcfLogReceiverClientBase : ClientBase, IWcfLogReceiverClient, ICommunicationObject where TService : class |
Simple example:
using System;
namespace Library
{
public class TestBase : IDisposable
{
public void Dispose() { }
public int Port { get; set; }
public void Send(string msg) { }
}
}
using Library;
using System;
namespace Issue1949
{
interface ITest : IDisposable
{
int Port { get; set; }
void Send(string msg);
}
class Test : TestBase, ITest
{
}
} produces this exact code pattern: // Issue1949.Test
using Issue1949;
using Library;
using System;
internal class Test : TestBase, ITest, IDisposable
{
int ITest.get_Port()
{
return base.Port;
}
void ITest.set_Port(int value)
{
base.Port = value;
}
void ITest.Send(string msg)
{
Send(msg);
}
} |
Notes:
For the interface to be correctly implemented the methods must support |
See also #1682 |
A fix for this could easily implemented once we have a proper API that allows us to categorize/analyze the "role" of a method/type. See #1926 |
I think the solution here is to detect where an explicit interface implementation looks like it might have been generated by the C# compiler: If an explicit interface implementation would be re-generated by the compiler on re-compilation, we should omit it during decompilation. |
ILSpy version 6.0.0.5613-preview2
Seen this kind of issue:
there are some Properties in parent interface, eg:
there is a class that implements it (inherits)
as you see it decompiles in low level format, not as high level C# is expecting..
target:
err93.zip
The text was updated successfully, but these errors were encountered: