[Backend] Restore isMostPreciseContravariantArgument method for binary compatibility
^KT-56033 Fixed
This commit is contained in:
committed by
Space Team
parent
36bb418049
commit
2783aa13f5
@@ -37,10 +37,16 @@ import org.jetbrains.kotlin.types.checker.SimpleClassicTypeSystemContext
|
|||||||
import org.jetbrains.kotlin.types.checker.convertVariance
|
import org.jetbrains.kotlin.types.checker.convertVariance
|
||||||
import org.jetbrains.kotlin.types.getEffectiveVariance
|
import org.jetbrains.kotlin.types.getEffectiveVariance
|
||||||
import org.jetbrains.kotlin.types.model.KotlinTypeMarker
|
import org.jetbrains.kotlin.types.model.KotlinTypeMarker
|
||||||
|
import org.jetbrains.kotlin.types.model.TypeParameterMarker
|
||||||
|
|
||||||
fun TypeSystemCommonBackendContext.isMostPreciseContravariantArgument(type: KotlinTypeMarker): Boolean =
|
fun TypeSystemCommonBackendContext.isMostPreciseContravariantArgument(type: KotlinTypeMarker): Boolean =
|
||||||
type.typeConstructor().isAnyConstructor()
|
type.typeConstructor().isAnyConstructor()
|
||||||
|
|
||||||
|
@Suppress("UNUSED_PARAMETER")
|
||||||
|
@Deprecated("This method is needed for binary compatibility. See KT-56033", level = DeprecationLevel.HIDDEN)
|
||||||
|
fun TypeSystemCommonBackendContext.isMostPreciseContravariantArgument(type: KotlinTypeMarker, parameter: TypeParameterMarker): Boolean =
|
||||||
|
isMostPreciseCovariantArgument(type)
|
||||||
|
|
||||||
fun TypeSystemCommonBackendContext.isMostPreciseCovariantArgument(type: KotlinTypeMarker): Boolean =
|
fun TypeSystemCommonBackendContext.isMostPreciseCovariantArgument(type: KotlinTypeMarker): Boolean =
|
||||||
!canHaveSubtypesIgnoringNullability(type)
|
!canHaveSubtypesIgnoringNullability(type)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user