Files
kotlin-fork/compiler/testData/diagnostics/testsWithStdLib/regression/kt34391.fir.kt
T
2021-07-23 23:58:55 +03:00

20 lines
405 B
Kotlin
Vendored

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