FIR LT: Introduce source file abstraction, carry it from parsing to IR
along with source lines mapping, allows to "emulate" usage of the PSI files which allows to extract source file and line mapping info on every stage from source element. It makes sense to use this mapping for the error reporting too.
This commit is contained in:
@@ -25,6 +25,7 @@ import org.jetbrains.kotlin.codegen.inline.GENERATE_SMAP
|
||||
import org.jetbrains.kotlin.test.KotlinBaseTest
|
||||
import org.jetbrains.kotlin.test.util.JUnit4Assertions
|
||||
import org.junit.Assert
|
||||
import java.io.File
|
||||
import java.io.StringReader
|
||||
|
||||
object SMAPTestUtil {
|
||||
@@ -62,7 +63,7 @@ object SMAPTestUtil {
|
||||
}.associateBy { it.sourceFile }
|
||||
|
||||
for (source in sourceData) {
|
||||
val ktFileName = "/" + source.sourceFile
|
||||
val ktFileName = "/" + File(source.sourceFile).name
|
||||
.replace(".smap-nonseparate-compilation", ".kt")
|
||||
.replace(".smap-separate-compilation", ".kt")
|
||||
.replace(".smap", ".kt")
|
||||
|
||||
Reference in New Issue
Block a user