Files
kotlin/compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/deeplyNestedExpression.kt
Dmitry Savvinov ee8702d21e Load of testdata change due to contracts publishing
See changes in e2606b72bdbec2fea567d4127197707869eb801e
2018-08-30 16:19:55 +03:00

15 lines
465 B
Kotlin
Vendored

// !LANGUAGE: +AllowContractsForCustomFunctions +ReadDeserializedContracts
// !USE_EXPERIMENTAL: kotlin.contracts.ExperimentalContracts
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
package test
import kotlin.contracts.*
class A
fun deeplyNested(x: Any?, y: Any?, b: Boolean, s: String?) {
contract {
returns(true) implies (((x is Int && x is String) || (x is Int && y is A) || b || (!b)) && s != null && (y is A || x is String))
}
}