Skip to content

Add Warnings if we generate methods with same name as existing methods  #27

@twiglet

Description

@twiglet

I was thinking of a case like this:

public class RenameTest {

    public string AMethod(object x) {
        return "AMethod has arg " + x.ToString();
    }

    public string aMethod(string s) {
        return "aMethod has string arg \"" + s + "\"";
    }

    public static void RNMain(string arg) {
        RenameTest rnObj = new RenameTest();
        Console.Out.WriteLine(rnObj.AMethod(arg));   // *******
    }   

}

After renaming then the starred line will call a different method because of the more specific overload.

As you say this can happen already with properties and setXXXXX methods. We will look into adding warnings if we detect this might happen.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions