Do preparation of enhancement as well (for types with enhancement), during subtype checks
^KT-47899 Fixed
This commit is contained in:
committed by
teamcityserver
parent
c5d783596d
commit
5684b6977a
@@ -144,6 +144,9 @@ fun KotlinType.unwrapEnhancementDeeply() = getEnhancementDeeply() ?: this
|
||||
|
||||
fun KotlinType.unwrapEnhancement(): KotlinType = getEnhancement() ?: this
|
||||
|
||||
fun UnwrappedType.inheritEnhancement(origin: KotlinType, transform: (KotlinType) -> KotlinType): UnwrappedType =
|
||||
wrapEnhancement(origin.getEnhancement()?.let(transform))
|
||||
|
||||
fun UnwrappedType.inheritEnhancement(origin: KotlinType): UnwrappedType = wrapEnhancement(origin.getEnhancement())
|
||||
|
||||
fun UnwrappedType.wrapEnhancement(enhancement: KotlinType?): UnwrappedType {
|
||||
|
||||
@@ -68,7 +68,7 @@ abstract class KotlinTypePreparator : AbstractTypePreparator {
|
||||
unwrappedType
|
||||
}
|
||||
}
|
||||
}.inheritEnhancement(unwrappedType)
|
||||
}.inheritEnhancement(unwrappedType, ::prepareType)
|
||||
}
|
||||
|
||||
object Default : KotlinTypePreparator()
|
||||
|
||||
Reference in New Issue
Block a user