4ffcbc0c2f
#KT-38134 Fixed #KT-34433 Fixed #KT-31823 Fixed
12 lines
393 B
Kotlin
Vendored
12 lines
393 B
Kotlin
Vendored
interface UpdatableRendering<out T : UpdatableRendering<T>> {
|
|
fun canUpdateFrom(another: @UnsafeVariance T): Boolean
|
|
}
|
|
|
|
internal fun Any.matchesRendering(other: Any): Boolean {
|
|
return when {
|
|
this::class != other::class -> false
|
|
this !is UpdatableRendering<*> -> true
|
|
else -> <!DEBUG_INFO_SMARTCAST!>this<!>.canUpdateFrom(other as UpdatableRendering<*>)
|
|
}
|
|
}
|