diff --git a/jps/jps-plugin/test/org/jetbrains/kotlin/jps/build/AbstractLookupTrackerTest.kt b/jps/jps-plugin/test/org/jetbrains/kotlin/jps/build/AbstractLookupTrackerTest.kt index 6b71c749f94..44646a79e42 100644 --- a/jps/jps-plugin/test/org/jetbrains/kotlin/jps/build/AbstractLookupTrackerTest.kt +++ b/jps/jps-plugin/test/org/jetbrains/kotlin/jps/build/AbstractLookupTrackerTest.kt @@ -17,6 +17,7 @@ package org.jetbrains.kotlin.jps.build import com.intellij.openapi.util.io.FileUtil +import org.jetbrains.kotlin.incremental.components.LocationInfo import org.jetbrains.kotlin.incremental.components.LookupTracker import org.jetbrains.kotlin.incremental.components.ScopeKind import org.jetbrains.kotlin.test.JetTestUtils @@ -55,8 +56,8 @@ abstract class AbstractLookupTrackerTest : AbstractIncrementalJpsTest( val lines = text.lines().toArrayList() - for ((line, lookupsFromLine) in lookupsFromFile.groupBy { it.lookupLine!! }) { - val columnToLookups = lookupsFromLine.groupBy { it.lookupColumn!! }.toList().sortedBy { it.first } + for ((line, lookupsFromLine) in lookupsFromFile.groupBy { it.lookupLine }) { + val columnToLookups = lookupsFromLine.groupBy { it.lookupColumn }.toList().sortedBy { it.first } val lineContent = lines[line - 1] val parts = ArrayList(columnToLookups.size * 2) @@ -135,8 +136,8 @@ abstract class AbstractLookupTrackerTest : AbstractIncrementalJpsTest( private data class LookupInfo( val lookupContainingFile: String, - val lookupLine: Int?, - val lookupColumn: Int?, + val lookupLine: Int, + val lookupColumn: Int, val scopeFqName: String, val scopeKind: ScopeKind, val name: String @@ -145,14 +146,9 @@ private data class LookupInfo( private class TestLookupTracker : LookupTracker { val lookups = arrayListOf() - override val requiresLookupLineAndColumn: Boolean - get() = true - - override fun record( - lookupContainingFile: String, lookupLine: Int?, lookupColumn: Int?, - scopeFqName: String, scopeKind: ScopeKind, name: String - ) { - lookups.add(LookupInfo(lookupContainingFile, lookupLine, lookupColumn, scopeFqName, scopeKind, name)) + override fun record(locationInfo: LocationInfo, scopeFqName: String, scopeKind: ScopeKind, name: String) { + val (line, column) = locationInfo.position + lookups.add(LookupInfo(locationInfo.filePath, line, column, scopeFqName, scopeKind, name)) } }