Kotlin: Let useFunction worry about isLocalFunction for us

This commit is contained in:
Ian Lynagh
2022-06-24 14:24:02 +01:00
parent 46446f9dfa
commit c0b6d1d093

View File

@@ -732,12 +732,9 @@ open class KotlinFileExtractor(
val id =
idOverride
?: if (f.isLocalFunction())
getLocallyVisibleFunctionLabels(f).function
else
// If this is a class that would ordinarily be replaced by a Java equivalent (e.g. kotlin.Map -> java.util.Map),
// don't replace here, really extract the Kotlin version:
useFunction<DbCallable>(f, parentId, classTypeArgsIncludingOuterClasses, noReplace = true)
?: // If this is a class that would ordinarily be replaced by a Java equivalent (e.g. kotlin.Map -> java.util.Map),
// don't replace here, really extract the Kotlin version:
useFunction<DbCallable>(f, parentId, classTypeArgsIncludingOuterClasses, noReplace = true)
val sourceDeclaration =
if (typeSubstitution != null && idOverride == null)