Files
kotlin/compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/withReceiver.kt
2018-07-05 10:42:38 +03:00

13 lines
317 B
Kotlin
Vendored

// !LANGUAGE: +AllowContractsForCustomFunctions +ReadDeserializedContracts
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
package test
import kotlin.internal.contracts.*
fun Any?.isNotNull(): Boolean {
contract {
returns(true) implies (this@isNotNull != null)
}
return this != null
}