icsharpcode / SharpDevelop

#develop (short for SharpDevelop) is a free IDE for .NET programming languages.
2.09k stars 773 forks source link

Wrong error highlighting with interface implementation #574

Closed lvv83 closed 10 years ago

lvv83 commented 10 years ago

Hello.

Please first read this post at StackOverflow.

In SharpDevelop quasi-implementation of IContract in Derived class will be highlighted as error with next message "Missing interface member implementations".

Rpinski commented 10 years ago

Which version did you test with? I couldn't reproduce it with SD 5 RC or the latest development build.

lvv83 commented 10 years ago

I use SharpDevelop Version 5.0.0.4728 RC

I found difference between StackOverflow post and my sample. Add event declaration to the interface

public interface IContract
{
    void Func();
    event EventHandler MyEvent;
}

// Note that Base does **not** derive from IContract
public abstract class Base
{
    public void Func()
    {
        Console.WriteLine("Base.Func");
    }

    public event EventHandler MyEvent;
}

// Note that Derived does *not* provide implementation for IContract
public class Derived : Base, IContract  
{
}
Rpinski commented 10 years ago

Ok, now I see, the event is not handled correctly.