15 lines
284 B
Kotlin
Vendored
15 lines
284 B
Kotlin
Vendored
// !DIAGNOSTICS: -NOTHING_TO_INLINE
|
|
|
|
inline fun <T> foo(t1: T, t2: T) = t1 ?: t2
|
|
|
|
inline fun <T> bar(l: (T) -> Unit): T = null!!
|
|
|
|
fun use() {
|
|
var x: Int?
|
|
x = 5
|
|
// Write is AFTER
|
|
x.hashCode()
|
|
// x is nullable at the second argument
|
|
foo(bar { x = null }, x!!)
|
|
}
|