Files
kotlin-fork/compiler/testData/diagnostics/tests/inline/parenthesized.fir.kt
T
Dmitriy Novozhilov 32c3f85679 [FIR] Add inline checker for bodies of inline functions
This checker doesn't support `@PublishedAPI` yet, so some BB tests for it
 were muted. #KT-46270
2021-04-27 18:39:09 +03:00

28 lines
565 B
Kotlin
Vendored

// !CHECK_TYPE
inline fun inlineFunWithInvoke(s: (p: Int) -> Unit) {
(s)(11)
(s).invoke(11)
(s) invoke 11
(<!USAGE_IS_NOT_INLINABLE!>s<!>)
}
inline fun Function1<Int, Unit>.inlineExt() {
(this).invoke(11)
(this) invoke 11
(this)(11)
(this)
}
inline fun inlineFunWithInvoke2(s: (p: Int) -> Unit) {
(((s)))(11)
(((s))).invoke(11)
(((s))) invoke 11
(((<!USAGE_IS_NOT_INLINABLE!>s<!>)))
}
inline fun propagation(s: (p: Int) -> Unit) {
inlineFunWithInvoke((label@ s))
inlineFunWithInvoke((label2@ label@ s))
}