Skip to content

Commit ab19d8c

Browse files
committed
Kotlin: Move useFunctionCommon
1 parent 298f4ab commit ab19d8c

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,15 +1146,6 @@ open class KotlinUsesExtractor(
11461146
return res
11471147
}
11481148

1149-
fun <T: DbCallable> useFunctionCommon(f: IrFunction, label: String): Label<out T> {
1150-
val id: Label<T> = tw.getLabelFor(label)
1151-
if (isExternalDeclaration(f)) {
1152-
extractFunctionLaterIfExternalFileMember(f)
1153-
extractExternalEnclosingClassLater(f)
1154-
}
1155-
return id
1156-
}
1157-
11581149
// These are classes with Java equivalents, but whose methods don't all exist on those Java equivalents--
11591150
// for example, the numeric classes define arithmetic functions (Int.plus, Long.or and so on) that lower to
11601151
// primitive arithmetic on the JVM, but which we extract as calls to reflect the source syntax more closely.
@@ -1224,6 +1215,15 @@ open class KotlinUsesExtractor(
12241215
useFunctionCommon<T>(it, getFunctionLabel(it, parentId, classTypeArgsIncludingOuterClasses))
12251216
}
12261217

1218+
private fun <T: DbCallable> useFunctionCommon(f: IrFunction, label: String): Label<out T> {
1219+
val id: Label<T> = tw.getLabelFor(label)
1220+
if (isExternalDeclaration(f)) {
1221+
extractFunctionLaterIfExternalFileMember(f)
1222+
extractExternalEnclosingClassLater(f)
1223+
}
1224+
return id
1225+
}
1226+
12271227
fun getTypeArgumentLabel(
12281228
arg: IrTypeArgument
12291229
): TypeResult<DbReftype> {

0 commit comments

Comments
 (0)