[NI] Get rid of FE 1.0 types in AbstractTypeCheckerContextForConstraintSystem

This commit is contained in:
Dmitriy Novozhilov
2020-08-25 18:39:45 +03:00
parent 686c17a234
commit 527c5a771d
5 changed files with 35 additions and 5 deletions
@@ -173,6 +173,9 @@ interface TypeSystemInferenceExtensionContext : TypeSystemContext, TypeSystemBui
firstCandidate: KotlinTypeMarker,
secondCandidate: KotlinTypeMarker
): KotlinTypeMarker
fun TypeConstructorMarker.isTypeVariable(): Boolean
fun TypeVariableTypeConstructorMarker.isContainedInInvariantOrContravariantPositions(): Boolean
}
@@ -517,6 +517,14 @@ interface ClassicTypeSystemContext : TypeSystemInferenceExtensionContext, TypeSy
errorSupportedOnlyInTypeInference()
}
override fun TypeConstructorMarker.isTypeVariable(): Boolean {
errorSupportedOnlyInTypeInference()
}
override fun TypeVariableTypeConstructorMarker.isContainedInInvariantOrContravariantPositions(): Boolean {
errorSupportedOnlyInTypeInference()
}
override fun findCommonIntegerLiteralTypesSuperType(explicitSupertypes: List<SimpleTypeMarker>): SimpleTypeMarker? {
@Suppress("UNCHECKED_CAST")
explicitSupertypes as List<SimpleType>