[FIR] Check is for impossibility
^KT-58203 Fixed ^KT-62646
This commit is contained in:
committed by
Space Team
parent
92d8da621e
commit
88ff93df7f
@@ -5,7 +5,7 @@ interface Entity<T>
|
||||
abstract class SecuredEntity<out E>(val entity: E) where E : Entity<Int>, E : SecurityCodeAware<*,*>
|
||||
interface SecurityCodeAware<out E, R : SecuredEntity<E>> where E : Entity<Int>, E : SecurityCodeAware<E, R>
|
||||
fun <E, R : SecuredEntity<E>> SecurityCodeAware<E, R>.secured() : R where E : Entity<Int>, E : SecurityCodeAware<E, R> = <!RETURN_TYPE_MISMATCH!>when(this) {
|
||||
is Order -> SecuredOrder(this)
|
||||
<!USELESS_IS_CHECK!>is Order<!> -> SecuredOrder(this)
|
||||
else -> null!!
|
||||
}<!>
|
||||
class Order : Entity<Int>
|
||||
|
||||
Reference in New Issue
Block a user