Kotlin: Return more precise types from PopulateFile.java

This commit is contained in:
Ian Lynagh
2021-11-22 17:48:44 +00:00
parent 83ac77dccc
commit 1990b68c21
2 changed files with 5 additions and 6 deletions

View File

@@ -163,13 +163,11 @@ open class FileTrapWriter (
): TrapWriter (lm, bw) {
val populateFile = PopulateFile(this)
val splitFilePath = filePath.split("!/")
@Suppress("UNCHECKED_CAST")
val fileId =
(if(splitFilePath.size == 1)
if(splitFilePath.size == 1)
populateFile.getFileLabel(File(filePath), populateFileTables)
else
populateFile.getFileInJarLabel(File(splitFilePath.get(0)), splitFilePath.get(1), populateFileTables)
) as Label<DbFile>
fun getLocation(e: IrElement): Label<DbLocation> {
return getLocation(e.startOffset, e.endOffset)