16 lines
404 B
Kotlin
Vendored
16 lines
404 B
Kotlin
Vendored
// !WITH_NEW_INFERENCE
|
|
fun trans(n: Int, f: () -> Boolean) = if (f()) n else null
|
|
|
|
fun foo() {
|
|
var i: Int? = 5
|
|
if (i != null) {
|
|
fun can(): Boolean {
|
|
i = null
|
|
return true
|
|
}
|
|
<!SMARTCAST_IMPOSSIBLE!>i<!>.hashCode()
|
|
trans(<!NI;SMARTCAST_IMPOSSIBLE, SMARTCAST_IMPOSSIBLE!>i<!>, ::can)
|
|
<!SMARTCAST_IMPOSSIBLE!>i<!>.hashCode()
|
|
}
|
|
}
|