dotnet/roslyn

Rename doesn't resolve conflict via callsite cast

Open

#8,296 opened on Feb 2, 2016

View on GitHub
 (0 comments) (0 reactions) (0 assignees)C# (4,257 forks)batch import
Area-IDEFeature - Renamehelp wanted

Repository metrics

Stars
 (20,414 stars)
PR merge metrics
 (Avg merge 6d 17h) (256 merged PRs in 30d)

Description

interface IX
{
    void M(); 
} 
interface IY : IX
{
    int A(); 
} 

class C
{
    void Foo()
    {
        IY y = null; 
        y.M();
    }
}

Rename A to M.

Roslyn will show an unresolvable conflict, instead of casting the callsite to IX to call the base method.

Contributor guide