Skip to content

Move Method refactoring causes name shadowing. #4300

@assdfsdafasfa

Description

@assdfsdafasfa

Select the "methodToBeMoved" in class SourceClass, and move to class TargetClass
Before refactoring

class TargetClass {
}
class SubClass extends TargetClass {
    static public void methodToBeMoved() {
    }
}

class SourceClass {
    TargetClass t;
    void methodToBeMoved() {
    }
}
class TargetClass {
    void methodToBeMoved() {
    }
}
class SubClass extends TargetClass {
    static public void methodToBeMoved() {
    }
}
class SourceClass {
    TargetClass t;
}

Error: This static method cannot hide the instance method from TargetClass

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions