FirReturnsImpliesAnalyzer: find receiver/variable of accessor properly

This commit is contained in:
Mikhail Glukhikh
2021-03-10 13:12:11 +03:00
parent a345b81f2a
commit 798d848a91
3 changed files with 47 additions and 22 deletions
@@ -11,8 +11,8 @@ fun Any?.isNotNull(): Boolean {
@OptIn(ExperimentalContracts::class)
val Any?.isNotNull: Boolean
get() {
<!WRONG_IMPLIES_CONDITION!>contract {
contract {
returns(true) implies (this@isNotNull != null)
}<!>
}
return this@isNotNull != null
}