Have one more question, everytime a create and use...
# announcements
s
Have one more question, everytime a create and use a function with contract I need to add the annotation
@ExperimentalContracts
?
i
You can opt-in for an experimental feature either in propagating or in non-propagating way. You can find more about it here https://github.com/Kotlin/KEEP/blob/master/proposals/experimental.md
👍 1
e
To summarize, put this in your build.gradle:
Copy code
kotlin {
  sourceSets.all {
    languageSettings {       useExperimentalAnnotation('kotlin.contracts.ExperimentalContracts')
    }
  }
}
i
@Egor Trutenko That's one possible solution, but I recommend to understand the design of these annotations first, before deciding to use this way to opt-in.