Files
kotlin-fork/compiler/testData/codegen/box/extensionClasses/genericCollection.kt
T
2021-12-09 13:26:38 +03:00

15 lines
329 B
Kotlin
Vendored

// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// FIR status: context receivers aren't yet supported
// WITH_STDLIB
context(Collection<P>) class A<P> {
val result = if (!isEmpty()) "OK" else "fail"
}
fun box(): String {
with (listOf(1, 2, 3)) {
return A().result
}
}