W3cubDocs

/Kotlin

ExperimentalContracts

Platform and version requirements: JVM (1.3), JS (1.3), Native (1.3)
annotation class ExperimentalContracts

This marker distinguishes the experimental contract declaration API and is used to opt-in for that feature when declaring contracts of user functions.

Any usage of a declaration annotated with @ExperimentalContracts must be accepted either by annotating that usage with the OptIn annotation, e.g. @OptIn(ExperimentalContracts::class), or by using the compiler argument -Xopt-in=kotlin.contracts.ExperimentalContracts.

Constructors

Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)

<init>

This marker distinguishes the experimental contract declaration API and is used to opt-in for that feature when declaring contracts of user functions.

ExperimentalContracts()

© 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/-experimental-contracts/index.html