[FIR] Implement checks for contract not allowed

^KT-55423 Fixed
This commit is contained in:
Kirill Rakhman
2023-02-08 12:03:36 +01:00
committed by Space Team
parent b2fbf8bed5
commit f946ddeb40
50 changed files with 377 additions and 178 deletions
@@ -12,8 +12,8 @@ fun Any?.isNotNull(): Boolean {
@OptIn(ExperimentalContracts::class)
val Any?.isNotNull: Boolean
get() {
contract {
<!CONTRACT_NOT_ALLOWED!>contract<!> {
returns(true) implies (this@isNotNull != null)
}
return this@isNotNull != null
}
}