KT-13355
An overridden abstract member with a more specific "return type" than an overridden concrete member should be explicitly overridden even if the class in question can have abstract members.
This commit is contained in:
@@ -80,6 +80,7 @@ fun <T: Any> T.check(predicate: (T) -> Boolean): T? = if (predicate(this)) this
|
||||
|
||||
inline fun <reified T : Any> Any?.safeAs(): T? = this as? T
|
||||
inline fun <reified T : Any> Any?.cast(): T = this as T
|
||||
inline fun <reified T : Any> Any?.assertedCast(message: () -> String): T = this as? T ?: throw AssertionError(message())
|
||||
|
||||
fun <T : Any> constant(calculator: () -> T): T {
|
||||
val cached = constantMap[calculator]
|
||||
|
||||
Reference in New Issue
Block a user