FIR find usage: correctly set extendsList of FirLightInterfaceClassSymbol

The existing code does not set the list of bases that
FirLightInterfaceClassSymbol extends for "extendsList". It collects only
the set of interfaces for "extendsList" of FirLightInterfaceClassSymbol.
However, interfaces can "extend" other classes and/or interfaces, but
they cannot "implement" other interfaces. Therefore, we have to includes
all interfaces and classes that the child interface extends in
the "extendsList". Additionally, this commit adds `private fun
PsiClass.hasSuper(..): Boolean` to FirLightClassBase that returns
whether one of recursive super classes of the PsiClass is `baseClass`
or not. This commit lets `isInheritor()` method use
`PsiClass.hasSuper()`.
This commit is contained in:
Jaebaek Seo
2022-06-21 20:59:19 +00:00
committed by Ilya Kirillov
parent 21f65b2fe3
commit ef482bb126
4 changed files with 24 additions and 6 deletions
@@ -3,7 +3,7 @@ public abstract interface C /* p.C*/ extends p.B {
public abstract java.lang.String c();// c()
public static final class DefaultImpls /* p.C.DefaultImpls*/ extends p.B {
public static final class DefaultImpls /* p.C.DefaultImpls*/ {
@org.jetbrains.annotations.NotNull()
public java.lang.String c();// c()