Files
kotlin/compiler/testData/codegen/bytecodeText/inline/inlineSuspendReifiedNoSpilling.kt
2020-02-18 11:43:37 +01:00

27 lines
703 B
Kotlin
Vendored

// $$forInline suffix is not needed: KT-36797
// JVM_IR generates fake inliner variable with suffix $$forInline, when old BE does not do this
// IGNORE_BACKEND: JVM_IR
interface ApplicationCall
interface AuthenticationService {
suspend fun execute(request: Any): Any
}
suspend fun dummy() = Any()
suspend inline fun <reified Type : Any> ApplicationCall.receiveJSON(): Type {
return dummy() as Type
}
suspend inline fun ApplicationCall.respond(message: Any) {
}
suspend fun ApplicationCall.test(authenticationService: AuthenticationService) {
respond(authenticationService.execute(receiveJSON()))
}
// 2 ISTORE 5
// 0 ILOAD 5
// 1 \$i\$f\$receiveJSON I .* 5
// 1 \$i\$f\$respond I .* 5