Files
kotlin/compiler/testData/codegen/bytecodeText/inline/inlineSuspendReifiedNoSpilling.kt
Ilmir Usmanov e8c52e0a8f Do not mark fake inliner variables as alive
This prevents them from spilling.
 #KT-29317 Fixed
2019-01-18 13:45:20 +03:00

26 lines
562 B
Kotlin
Vendored

// 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