https://kotlinlang.org logo
Title
j

jameskleeh

12/21/2021, 4:19 PM
@Jiaxiang Does that seem expected or should I file an issue?
:thread-please: 2
j

Jiaxiang

12/21/2021, 6:24 PM
Can you add a sample code for this? It can help me understand your ask
j

jameskleeh

12/21/2021, 7:52 PM
Sure
class Foo extends GenBase<String> {
    public String getName() {
        return "test";
    }
}

abstract class GenBase<T> {
    abstract T getName();
    
    public T getOther() {
        return (T) "other";
    }
}
calling
getAllFunctions
on the
Foo
declaration returns the
getOther
function declaration
calling
closestClassDeclaration
on the function declaration returns
Foo
when I think it should return
GenBase
j

Jiaxiang

12/21/2021, 8:06 PM
makes sense, please file an issue 👍