@@ -901,7 +901,7 @@ open class KotlinFileExtractor(
901
901
if (f.isInline) {
902
902
addModifiers(id, " inline" )
903
903
}
904
- if (f.willExtractAsStatic ) {
904
+ if (f.shouldExtractAsStatic ) {
905
905
addModifiers(id, " static" )
906
906
}
907
907
if (f is IrSimpleFunction && f.overriddenSymbols.isNotEmpty()) {
@@ -1479,7 +1479,7 @@ open class KotlinFileExtractor(
1479
1479
1480
1480
tw.writeCallableBinding(id, methodId)
1481
1481
1482
- if (callTarget.willExtractAsStatic ) {
1482
+ if (callTarget.shouldExtractAsStatic ) {
1483
1483
extractStaticTypeAccessQualifier(callTarget, id, locId, enclosingCallable, enclosingStmt)
1484
1484
} else if (extractDispatchReceiver != null ) {
1485
1485
extractDispatchReceiver(id)
@@ -1502,24 +1502,24 @@ open class KotlinFileExtractor(
1502
1502
}
1503
1503
1504
1504
private fun extractStaticTypeAccessQualifier (target : IrDeclaration , parentExpr : Label <out DbExprparent >, locId : Label <DbLocation >, enclosingCallable : Label <out DbCallable >, enclosingStmt : Label <out DbStmt >) {
1505
- if (target.willExtractAsStaticMemberOfClass ) {
1505
+ if (target.shouldExtractAsStaticMemberOfClass ) {
1506
1506
extractTypeAccessRecursive(target.parentAsClass.toRawType(), locId, parentExpr, - 1 , enclosingCallable, enclosingStmt)
1507
- } else if (target.willExtractAsStaticMemberOfFile ) {
1507
+ } else if (target.shouldExtractAsStaticMemberOfFile ) {
1508
1508
extractTypeAccess(useFileClassType(target.parent as IrFile ), locId, parentExpr, - 1 , enclosingCallable, enclosingStmt)
1509
1509
}
1510
1510
}
1511
1511
1512
- private val IrDeclaration .willExtractAsStaticMemberOfClass : Boolean
1513
- get() = this .willExtractAsStatic && parent is IrClass
1512
+ private val IrDeclaration .shouldExtractAsStaticMemberOfClass : Boolean
1513
+ get() = this .shouldExtractAsStatic && parent is IrClass
1514
1514
1515
- private val IrDeclaration .willExtractAsStaticMemberOfFile : Boolean
1516
- get() = this .willExtractAsStatic && parent is IrFile
1515
+ private val IrDeclaration .shouldExtractAsStaticMemberOfFile : Boolean
1516
+ get() = this .shouldExtractAsStatic && parent is IrFile
1517
1517
1518
1518
private fun isStaticAnnotatedNonCompanionMember (f : IrSimpleFunction ) =
1519
1519
f.parentClassOrNull?.isNonCompanionObject == true &&
1520
1520
(f.hasAnnotation(jvmStaticFqName) || f.correspondingPropertySymbol?.owner?.hasAnnotation(jvmStaticFqName) == true )
1521
1521
1522
- private val IrDeclaration .willExtractAsStatic : Boolean
1522
+ private val IrDeclaration .shouldExtractAsStatic : Boolean
1523
1523
get() = this is IrSimpleFunction && (isStaticFunction(this ) || isStaticAnnotatedNonCompanionMember(this )) ||
1524
1524
this is IrField && this .isStatic ||
1525
1525
this is IrEnumEntry
@@ -3063,7 +3063,7 @@ open class KotlinFileExtractor(
3063
3063
val locId = tw.getLocation(e)
3064
3064
val type = useType(e.type)
3065
3065
3066
- if (containingDeclaration.willExtractAsStatic && containingDeclaration.parentClassOrNull?.isNonCompanionObject == true ) {
3066
+ if (containingDeclaration.shouldExtractAsStatic && containingDeclaration.parentClassOrNull?.isNonCompanionObject == true ) {
3067
3067
// Use of `this` in a non-companion object member that will be lowered to a static function -- replace with a reference
3068
3068
// to the corresponding static object instance.
3069
3069
val instanceField = useObjectClassInstance(containingDeclaration.parentAsClass)
0 commit comments