This project is read-only.
1
Vote

Rename doesn't show conflict in interface mapping

description

Source:
public class Base : IEnumerable {
    public IEnumerator GetEnumerator() {
        throw new NotImplementedException();
    }
}
public class Derived : Base, IWeird, IEnumerable {
    public void X() { }
}
interface IWeird {
    void X();
}
Rename X in the interface to GetEnumerator().
It will show no conflicts, even though this changes the derived type's interface mapping for IEnumerable.

comments

Pilchie wrote Nov 17, 2014 at 5:37 PM

Note - since we report a warning about hiding the base class version of GetEnumerator(), we don't think this is important to fix in the short term.

SSL wrote Nov 17, 2014 at 6:20 PM

What if Derived.X() was shadowing an existing Base.X() and thus already has the new modifier?
You then (I think) wouldn't show any warning.

I'm not sure if that's a non-corner-case enough scenario to make a fix more important.