FIR LC: populate constructors after member methods

This commit is contained in:
Jinseong Jeon
2021-08-02 22:16:21 -07:00
committed by Ilya Kirillov
parent edc134ef2d
commit fba480875f
@@ -88,8 +88,6 @@ internal class FirLightClassForSymbol(
analyzeWithSymbolAsContext(classOrObjectSymbol) {
val declaredMemberScope = classOrObjectSymbol.getDeclaredMemberScope()
createConstructors(declaredMemberScope.getConstructors(), result)
val visibleDeclarations = declaredMemberScope.getCallableSymbols().applyIf(isEnum) {
filterNot { function ->
function is KtFunctionSymbol && function.name.asString().let { it == "values" || it == "valueOf" }
@@ -102,6 +100,8 @@ internal class FirLightClassForSymbol(
val suppressStatic = classOrObjectSymbol.classKind == KtClassKind.COMPANION_OBJECT
createMethods(visibleDeclarations, result, suppressStaticForMethods = suppressStatic)
createConstructors(declaredMemberScope.getConstructors(), result)
}
addMethodsFromCompanionIfNeeded(result)
@@ -221,4 +221,4 @@ internal class FirLightClassForSymbol(
FirLightClassForSymbol(classOrObjectSymbol, manager)
override fun isValid(): Boolean = super.isValid() && classOrObjectSymbol.isValid()
}
}