Extract functions using their name from JvmName annotation

This commit is contained in:
Tamas Vajk
2022-04-20 11:09:05 +02:00
committed by Ian Lynagh
parent a24753f552
commit b66a3141f6
9 changed files with 98 additions and 20 deletions

View File

@@ -721,12 +721,16 @@ open class KotlinFileExtractor(
val returnType = useType(substReturnType, TypeContext.RETURN)
val shortName = getFunctionShortName(f)
val methodId = id.cast<DbMethod>()
tw.writeMethods(methodId, shortName, "$shortName$paramsSignature", returnType.javaResult.id, parentId, sourceDeclaration.cast<DbMethod>())
tw.writeMethods(methodId, shortName.nameInDB, "${shortName.nameInDB}$paramsSignature", returnType.javaResult.id, parentId, sourceDeclaration.cast<DbMethod>())
tw.writeMethodsKotlinType(methodId, returnType.kotlinResult.id)
if (!isExternalDeclaration(f)) {
extractTypeAccessRecursive(f.returnType, locId, id, -1)
}
if (shortName.nameInDB != shortName.kotlinName) {
tw.writeKtFunctionOriginalNames(methodId, shortName.kotlinName)
}
}
tw.writeHasLocation(id, locId)