I’m currently trying out the new EAP for Kotlin 1....
# eap
t
I’m currently trying out the new EAP for Kotlin 1.3.50. I wanted to use the new
Duration
in my project but keep getting the following compile error. I am unable to reproduce it in a new project when using
Duration
. Can anyone see what’s wrong?
This is the code what causes the error in my project:
Copy code
import kotlin.time.Duration
class DurationExample {
    var duration: Duration? = null
}
If I put this in a new project it works fine.
s
Did you annotate the class/file with
@UseExperimental(ExperimentalTime::class)
?
t
@Sergey Chelombitko I used the compiler argument. That made the experimental warning disappear
I tried adding the annotation as well but still the same compile error
d
Try disabling kapt
i
I've reproduced it in plain java class and filed as https://youtrack.jetbrains.com/issue/KT-33157
t
Great, thank you Ilya!