[NI] Get rid of left FE 1.0 types in NewConstraintSystemImpl
This commit is contained in:
+5
@@ -26,4 +26,9 @@ object ConeConstraintSystemUtilContext : ConstraintSystemUtilContext {
|
|||||||
// TODO, see TypeUtils.kt
|
// TODO, see TypeUtils.kt
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun TypeVariableMarker.isReified(): Boolean {
|
||||||
|
// TODO
|
||||||
|
return false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+5
@@ -27,4 +27,9 @@ object ClassicConstraintSystemUtilContext : ConstraintSystemUtilContext {
|
|||||||
require(this is KotlinType)
|
require(this is KotlinType)
|
||||||
return unCaptureKotlinType().unwrap()
|
return unCaptureKotlinType().unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun TypeVariableMarker.isReified(): Boolean {
|
||||||
|
if (this !is TypeVariableFromCallableDescriptor) return false
|
||||||
|
return originalTypeParameter.isReified
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -17,4 +17,5 @@ interface ConstraintSystemUtilContext {
|
|||||||
fun TypeVariableMarker.shouldBeFlexible(): Boolean
|
fun TypeVariableMarker.shouldBeFlexible(): Boolean
|
||||||
fun TypeVariableMarker.hasOnlyInputTypesAttribute(): Boolean
|
fun TypeVariableMarker.hasOnlyInputTypesAttribute(): Boolean
|
||||||
fun KotlinTypeMarker.unCapture(): KotlinTypeMarker
|
fun KotlinTypeMarker.unCapture(): KotlinTypeMarker
|
||||||
|
fun TypeVariableMarker.isReified(): Boolean
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-3
@@ -363,14 +363,13 @@ class NewConstraintSystemImpl(
|
|||||||
|
|
||||||
// ResultTypeResolver.Context, VariableFixationFinder.Context
|
// ResultTypeResolver.Context, VariableFixationFinder.Context
|
||||||
override fun isReified(variable: TypeVariableMarker): Boolean {
|
override fun isReified(variable: TypeVariableMarker): Boolean {
|
||||||
if (variable !is TypeVariableFromCallableDescriptor) return false
|
return with(utilContext) { variable.isReified() }
|
||||||
return variable.originalTypeParameter.isReified
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun bindingStubsForPostponedVariables(): Map<TypeVariableMarker, StubTypeMarker> {
|
override fun bindingStubsForPostponedVariables(): Map<TypeVariableMarker, StubTypeMarker> {
|
||||||
checkState(State.BUILDING, State.COMPLETION)
|
checkState(State.BUILDING, State.COMPLETION)
|
||||||
// TODO: SUB
|
// TODO: SUB
|
||||||
return storage.postponedTypeVariables.associate { it to createStubType(it)/*StubType(it.freshTypeConstructor() as TypeConstructor, it.defaultType().isMarkedNullable())*/ }
|
return storage.postponedTypeVariables.associateWith { createStubType(it) }
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun currentStorage(): ConstraintStorage {
|
override fun currentStorage(): ConstraintStorage {
|
||||||
|
|||||||
Reference in New Issue
Block a user