Abstract TypeApproximator from NewCapturedType
This commit is contained in:
@@ -481,6 +481,11 @@ interface ClassicTypeSystemContext : TypeSystemInferenceExtensionContext {
|
||||
require(constructor is TypeConstructor, constructor::errorMessage)
|
||||
return ErrorUtils.createErrorTypeWithCustomConstructor(debugName, constructor)
|
||||
}
|
||||
|
||||
override fun TypeConstructorMarker.isCapturedTypeConstructor(): Boolean {
|
||||
return this is NewCapturedTypeConstructor
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private fun captureFromExpressionInternal(type: UnwrappedType) = captureFromExpression(type)
|
||||
|
||||
@@ -22,4 +22,9 @@ fun KotlinTypeMarker.dependsOnTypeParameters(c: TypeSystemInferenceExtensionCont
|
||||
with(c) {
|
||||
val typeConstructors = typeParameters.mapTo(mutableSetOf()) { it.getTypeConstructor() }
|
||||
dependsOnTypeConstructor(c, typeConstructors)
|
||||
}
|
||||
|
||||
fun CapturedTypeMarker.captureStatus(c: TypeSystemInferenceExtensionContext) =
|
||||
with(c) {
|
||||
captureStatus()
|
||||
}
|
||||
@@ -24,6 +24,7 @@ interface StubTypeMarker : SimpleTypeMarker
|
||||
interface TypeArgumentListMarker
|
||||
|
||||
interface TypeVariableMarker
|
||||
interface TypeVariableTypeConstructorMarker : TypeConstructorMarker
|
||||
|
||||
interface TypeSubstitutorMarker
|
||||
|
||||
@@ -88,6 +89,8 @@ interface TypeSystemInferenceExtensionContext : TypeSystemContext, TypeSystemBui
|
||||
|
||||
fun TypeConstructorMarker.getApproximatedIntegerLiteralType(): KotlinTypeMarker
|
||||
|
||||
fun TypeConstructorMarker.isCapturedTypeConstructor(): Boolean
|
||||
|
||||
fun Collection<KotlinTypeMarker>.singleBestRepresentative(): KotlinTypeMarker?
|
||||
|
||||
fun KotlinTypeMarker.isUnit(): Boolean
|
||||
|
||||
Reference in New Issue
Block a user