Don't replace own callables, and use a more exact replacement-finding test

This commit is contained in:
Chris Smowton
2022-04-20 11:46:26 +01:00
parent ce87a89009
commit 71d2e7be3e
2 changed files with 34 additions and 19 deletions

View File

@@ -682,7 +682,9 @@ open class KotlinFileExtractor(
?: if (f.isLocalFunction())
getLocallyVisibleFunctionLabels(f).function
else
useFunction<DbCallable>(f, parentId, classTypeArgsIncludingOuterClasses)
// 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)