W3cubDocs

/Kotlin

implies

Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)
@ExperimentalContracts abstract infix fun implies(
    booleanExpression: Boolean
): ConditionalEffect

Specifies that this effect, when observed, guarantees booleanExpression to be true.

Note: booleanExpression can accept only a subset of boolean expressions, where a function parameter or receiver (this) undergoes

  • true of false checks, in case if the parameter or receiver is Boolean;
  • null-checks (== null, != null);
  • instance-checks (is, !is);
  • a combination of the above with the help of logic operators (&&, ||, !).

© 2010–2020 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.contracts/-simple-effect/implies.html