Merge duplicate functions

This commit is contained in:
Chris Smowton
2024-11-27 16:51:28 +00:00
parent e29d9ddacb
commit 97ecd18678
3 changed files with 2 additions and 6 deletions

View File

@@ -449,10 +449,6 @@ open class FileTrapWriter(
return getLocation(file, range)
}
fun getFileOnlyLocation(): Label<DbLocation> {
return getLocation(fileId, 0, 0, 0, 0)
}
/*
OLD: KE1
/** Gets a label for the location of `e`. */

View File

@@ -62,7 +62,7 @@ fun KotlinFileExtractor.extractClassSource(
}
}
val locId = c.psiSafe<KtElement>()?.let { tw.getLocation(it) } ?: tw.getFileOnlyLocation()
val locId = c.psiSafe<KtElement>()?.let { tw.getLocation(it) } ?: tw.getWholeFileLocation()
tw.writeHasLocation(id, locId)
// OLD: KE1

View File

@@ -510,7 +510,7 @@ OLD: KE1
val functionSyntax = f.psi as? KtDeclarationWithBody
val locId = functionSyntax?.let {
tw.getLocation(functionSyntax ?: TODO())
} ?: tw.getFileOnlyLocation()
} ?: tw.getWholeFileLocation()
/*
OLD: KE1
overriddenAttributes?.sourceLoc