FIR LC: use optimal type mapping mode for value parameter
This commit is contained in:
committed by
Ilya Kirillov
parent
6d150fb7a5
commit
d3c34fa200
+4
@@ -12,6 +12,7 @@ import org.jetbrains.kotlin.load.kotlin.TypeMappingMode
|
||||
|
||||
public abstract class KtPsiTypeProvider : KtAnalysisSessionComponent() {
|
||||
public abstract fun asPsiType(type: KtType, useSitePosition: PsiElement, mode: TypeMappingMode): PsiType?
|
||||
public abstract fun getOptimalModeForValueParameter(type: KtType): TypeMappingMode
|
||||
}
|
||||
|
||||
public interface KtPsiTypeProviderMixIn : KtAnalysisSessionMixIn {
|
||||
@@ -36,4 +37,7 @@ public interface KtPsiTypeProviderMixIn : KtAnalysisSessionMixIn {
|
||||
mode: TypeMappingMode = TypeMappingMode.DEFAULT,
|
||||
): PsiType? =
|
||||
analysisSession.psiTypeProvider.asPsiType(this, useSitePosition, mode)
|
||||
|
||||
public fun KtType.getOptimalModeForValueParameter(): TypeMappingMode =
|
||||
analysisSession.psiTypeProvider.getOptimalModeForValueParameter(this)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user