Cannot OptIn to an experimental annotation class
See original GitHub issueA minimal repro:
import kotlin.time.*
@ExperimentalTime
val res = runBlocking {
val mark = TimeSource.Monotonic.markNow()
delay(300)
mark.elapsedNow()
}
println(res)
Image for clarification:

Issue Analytics
- State:
- Created 3 years ago
- Comments:16
Top Results From Across the Web
Opt-in requirements | Kotlin
To opt in to using an API in a module, compile it with the argument -opt-in , specifying the fully qualified name of...
Read more >All About Opt-In Annotations - zsmb.co
In most cases, the API marked with opt-in annotations is public, but the annotation being present deters clients from using it.
Read more >Confusing warning message "This class can only be used with ...
If I @OptIn to experimental API with level = WARNING only then the annotation causes the following warning: [EXPERIMENTAL_IS_NOT_ENABLED] This class can ...
Read more >Handling multiple experimental annotations throughout an app
It does not force the users of this method/class to add annotation in their code. Opt-In Requirements | Kotlin. Problem. @ ...
Read more >How to add opt-in compiler argument in build.gradle?
annotation class ExperimentalComposeUiApi. That means, in order to use this LocalSoftwareKeyboardController , I need to add @OptIn() ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Does this compiles for you?
It seems that actual problem for you here is this issue
@frankgerhardt sorry for delay, I haven’t mentioned your message… For now it works like this.
Note that it should be the first executed cell in the notebook session.