8a5ae16947
Previously, inline suspend functions were effectively inline only, but ordinary inline functions can be used as noinline. To fix the issue, I generate two functions: one for inline with suffix $$forInline and without state machine; and the other one without any suffix and state machine for direct calls. This change does not affect effectively inline only suspend functions, i.e. functions with reified generics, annotated with @InlineOnly annotation and functions with crossinline parameters. #KT-20219: Fixed
39 lines
989 B
Kotlin
Vendored
39 lines
989 B
Kotlin
Vendored
// WITH_RUNTIME
|
|
|
|
suspend inline fun simple() {}
|
|
|
|
suspend inline fun <T> generic() {}
|
|
|
|
suspend inline fun <T, reified U> genericWithReified() {}
|
|
|
|
suspend inline fun Unit.simple() {}
|
|
|
|
suspend inline fun <T> T.generic() {}
|
|
|
|
suspend inline fun <T, reified U> T.genericWithReified() {}
|
|
|
|
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
|
@kotlin.internal.InlineOnly
|
|
suspend inline fun shouldNotHaveSuffix() {}
|
|
|
|
suspend inline fun acceptsCrossinline(crossinline c: () -> Unit) {}
|
|
|
|
class Foo {
|
|
suspend inline fun simple() {}
|
|
|
|
suspend inline fun <T> generic() {}
|
|
|
|
suspend inline fun <T, reified U> genericWithReified() {}
|
|
|
|
suspend inline fun Unit.simple() {}
|
|
|
|
suspend inline fun <T> T.generic() {}
|
|
|
|
suspend inline fun <T, reified U> T.genericWithReified() {}
|
|
|
|
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
|
@kotlin.internal.InlineOnly
|
|
suspend inline fun shouldNotHaveSuffix() {}
|
|
|
|
suspend inline fun acceptsCrossinline(crossinline c: () -> Unit) {}
|
|
} |