FIR IDE: implement expected type weigher for completion
This commit is contained in:
+4
-2
@@ -62,9 +62,11 @@ abstract class KtAnalysisSession(final override val token: ValidityToken) : Vali
|
||||
|
||||
fun KtDeclaration.getReturnKtType(): KtType = typeProvider.getReturnTypeForKtDeclaration(this)
|
||||
|
||||
fun KtType.isEqualTo(other: KtType): Boolean = typeProvider.isEqualTo(this, other)
|
||||
infix fun KtType.isEqualTo(other: KtType): Boolean = typeProvider.isEqualTo(this, other)
|
||||
|
||||
fun KtType.isSubTypeOf(superType: KtType): Boolean = typeProvider.isSubTypeOf(this, superType)
|
||||
infix fun KtType.isSubTypeOf(superType: KtType): Boolean = typeProvider.isSubTypeOf(this, superType)
|
||||
|
||||
fun KtExpression.getExpectedType(): KtType? = typeProvider.getExpectedType(this)
|
||||
|
||||
fun KtType.isBuiltInFunctionalType(): Boolean = typeProvider.isBuiltinFunctionalType(this)
|
||||
|
||||
|
||||
+2
@@ -18,4 +18,6 @@ abstract class KtTypeProvider : KtAnalysisSessionComponent() {
|
||||
|
||||
//TODO get rid of
|
||||
abstract fun isBuiltinFunctionalType(type: KtType): Boolean
|
||||
|
||||
abstract fun getExpectedType(expression: KtExpression): KtType?
|
||||
}
|
||||
Reference in New Issue
Block a user