Files
kotlin-fork/compiler/testData/codegen/box/inference/suspendExtensionRecevierFromConstraint.kt
T
Pavel Kirpichenkov 9dd3d8fb14 [NI] Fix extension function check after commonization
`isExtensionFunction` property is false for suspend functions
2020-10-13 11:00:21 +03:00

21 lines
397 B
Kotlin
Vendored

// WITH_RUNTIME
// KJS_WITH_FULL_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"
}