[minor] Pass minimally valid offsets on non-PSI ir file entry creation
allows to use e.g. `dumpTreesFromLineNumber` in tests on such files without assertions
This commit is contained in:
@@ -167,7 +167,7 @@ class Fir2IrConverter(
|
||||
private fun registerFileAndClasses(file: FirFile, moduleFragment: IrModuleFragment) {
|
||||
val fileEntry = when (file.origin) {
|
||||
FirDeclarationOrigin.Source ->
|
||||
file.psi?.let { PsiIrFileEntry(it as KtFile) } ?: NaiveSourceBasedFileEntryImpl(file.path ?: file.name)
|
||||
file.psi?.let { PsiIrFileEntry(it as KtFile) } ?: NaiveSourceBasedFileEntryImpl(file.path ?: file.name, intArrayOf(0))
|
||||
FirDeclarationOrigin.Synthetic -> NaiveSourceBasedFileEntryImpl(file.name)
|
||||
else -> error("Unsupported file origin: ${file.origin}")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user