@@ -1544,19 +1544,18 @@ open class KotlinFileExtractor(
1544
1544
}
1545
1545
1546
1546
private fun extractStaticTypeAccessQualifier (target : IrDeclaration , parentExpr : Label <out DbExprparent >, locId : Label <DbLocation >, enclosingCallable : Label <out DbCallable >, enclosingStmt : Label <out DbStmt >) {
1547
- if (target.shouldExtractAsStaticMemberOfClass) {
1548
- extractTypeAccessRecursive(target.parentAsClass.toRawType(), locId, parentExpr, - 1 , enclosingCallable, enclosingStmt)
1549
- } else if (target.shouldExtractAsStaticMemberOfFile) {
1550
- extractTypeAccess(useFileClassType(target.parent as IrFile ), locId, parentExpr, - 1 , enclosingCallable, enclosingStmt)
1547
+ if (target.shouldExtractAsStatic) {
1548
+ val parent = target.parent
1549
+ if (parent is IrClass ) {
1550
+ extractTypeAccessRecursive(parent.toRawType(), locId, parentExpr, - 1 , enclosingCallable, enclosingStmt)
1551
+ } else if (parent is IrFile ) {
1552
+ extractTypeAccess(useFileClassType(parent), locId, parentExpr, - 1 , enclosingCallable, enclosingStmt)
1553
+ } else {
1554
+ logger.warnElement(" Unexpected static type access qualifer ${parent.javaClass} " , target)
1555
+ }
1551
1556
}
1552
1557
}
1553
1558
1554
- private val IrDeclaration .shouldExtractAsStaticMemberOfClass: Boolean
1555
- get() = this .shouldExtractAsStatic && parent is IrClass
1556
-
1557
- private val IrDeclaration .shouldExtractAsStaticMemberOfFile: Boolean
1558
- get() = this .shouldExtractAsStatic && parent is IrFile
1559
-
1560
1559
private fun isStaticAnnotatedNonCompanionMember (f : IrSimpleFunction ) =
1561
1560
f.parentClassOrNull?.isNonCompanionObject == true &&
1562
1561
(f.hasAnnotation(jvmStaticFqName) || f.correspondingPropertySymbol?.owner?.hasAnnotation(jvmStaticFqName) == true )
0 commit comments