Files
kotlin-fork/compiler/testData/diagnostics/tests/inline/parenthesized.kt
T
2013-12-02 18:30:42 +04:00

25 lines
617 B
Kotlin

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)
(<!USAGE_IS_NOT_INLINABLE!>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: (p: Int) -> Unit)))
inlineFunWithInvoke((@label2 @label (s: (p: Int) -> Unit)))
}