Files
kotlin/compiler/testData/diagnostics/tests/inline/assignment.kt
2016-01-29 14:36:53 +03:00

14 lines
473 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE -NOTHING_TO_INLINE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE
inline fun inlineFunWithInvoke(s: (p: Int) -> Unit, ext: Int.(p: Int) -> Unit) {
var d = <!USAGE_IS_NOT_INLINABLE!>s<!>
d = <!USAGE_IS_NOT_INLINABLE!>s<!>
var e = <!USAGE_IS_NOT_INLINABLE!>ext<!>
e = <!USAGE_IS_NOT_INLINABLE!>ext<!>
}
inline fun Function1<Int, Unit>.inlineExt() {
var d = this
d = this
}