Pass JvmTarget to KotlinTypeMapper
Also use KotlinTypeMapper.RELEASE_COROUTINES_DEFAULT instead of false in FileRankingCalculator
This commit is contained in:
@@ -12,6 +12,7 @@ import org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
||||
import org.jetbrains.kotlin.codegen.ClassBuilderMode
|
||||
import org.jetbrains.kotlin.codegen.state.IncompatibleClassTracker
|
||||
import org.jetbrains.kotlin.codegen.state.KotlinTypeMapper
|
||||
import org.jetbrains.kotlin.config.JvmTarget
|
||||
import org.jetbrains.kotlin.descriptors.*
|
||||
import org.jetbrains.kotlin.diagnostics.DiagnosticUtils
|
||||
import org.jetbrains.kotlin.idea.caches.resolve.analyze
|
||||
@@ -417,7 +418,10 @@ abstract class FileRankingCalculator(
|
||||
}
|
||||
|
||||
private fun makeTypeMapper(bindingContext: BindingContext): KotlinTypeMapper {
|
||||
return KotlinTypeMapper(bindingContext, ClassBuilderMode.LIGHT_CLASSES, IncompatibleClassTracker.DoNothing, "debugger", false)
|
||||
return KotlinTypeMapper(
|
||||
bindingContext, ClassBuilderMode.LIGHT_CLASSES, IncompatibleClassTracker.DoNothing, "debugger", JvmTarget.DEFAULT,
|
||||
KotlinTypeMapper.RELEASE_COROUTINES_DEFAULT, false
|
||||
)
|
||||
}
|
||||
|
||||
companion object {
|
||||
@@ -429,4 +433,4 @@ private fun String.simpleName() = substringAfterLast('.').substringAfterLast('$'
|
||||
|
||||
private fun PsiElement.getLine(): Int {
|
||||
return DiagnosticUtils.getLineAndColumnInPsiFile(containingFile, textRange).line
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user