Files
kotlin-fork/compiler/testData/diagnostics/testsWithStdLib/regression/kt34391.kt
T
2021-09-10 16:29:13 +03:00

20 lines
407 B
Kotlin
Vendored

// !LANGUAGE: +NewInference
fun main() {
val list = listOf(A())
list.forEach(A::<!OPT_IN_USAGE_ERROR!>foo<!>)
list.forEach {
it.<!OPT_IN_USAGE_ERROR!>foo<!>()
}
}
class A {
@ExperimentalTime
fun foo() {
println("a")
}
}
@<!OPT_IN_IS_NOT_ENABLED!>RequiresOptIn<!>(level = <!OPT_IN_IS_NOT_ENABLED!>RequiresOptIn<!>.Level.ERROR)
annotation class ExperimentalTime