Files
kotlin-fork/compiler/testData/codegen/box/inference/suspendExtensionRecevierFromConstraint.kt
T
2021-10-14 17:24:07 +03:00

20 lines
372 B
Kotlin
Vendored

// WITH_RUNTIME
// !LANGUAGE: +NewInference
class ExtensionReceiver
typealias SuspendExtensionFunction = suspend ExtensionReceiver.() -> Unit
suspend fun ExtensionReceiver.extensionMethod() {}
fun test() {
val map = mutableMapOf<Unit, SuspendExtensionFunction>()
map[Unit] = {
extensionMethod()
}
}
fun box(): String {
test()
return "OK"
}