When I use `@OptIn` I get the warning "This class ...
# intellij
d
When I use
@OptIn
I get the warning "This class can only be used with the compiler argument '-Xopt-in=kotlin.RequiresOptIn'his class can only be used with the compiler argument '-Xopt-in=kotlin.RequiresOptIn'". I added the following in my `build.gradle.kts`:
Copy code
kotlin {
  targets.all {
    compilations.all {
      kotlinOptions.freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
    }
  }
}
But the warning remains.
👀 1
t
I have the same question 🙂
a
👍 2
t
Mine is not, but will try the suggested approach in the issue comments 🙏
d
Yes, that works! tyvm