moosetechnology / Famix

An abstract representation of source code. Famix is generic and can describe applications in multiple programming languages.
MIT License
12 stars 22 forks source link

`overridingMethods` on Java class methods does not work properly #724

Closed LABSARI closed 4 months ago

LABSARI commented 4 months ago
class A {
    void foo() {
        System.out.println("A.foo");
    }
}

class B extends A {
    @Override
    void foo() {
        System.out.println("B.foo");
    }
}

// Class C, subclass of B, also overrides foo
class C extends B {
    @Override
    void foo() {
        System.out.println("C.foo");
    }
}

In this example, A.foo is overriden by B.foo and C.foo. overridingMethods on A.foo returns only B.foo. It should return both B.foo and C.foo. It should not stop to look down when it finds an overriding method.