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

14 lines
413 B
Kotlin
Vendored

// !LANGUAGE: +AllowContractsForCustomFunctions +ReadDeserializedContracts
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
package test
import kotlin.internal.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))
}
}