implies

Common
JVM
JS
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 (&&, ||, !).