Files
kotlin-fork/compiler/testData/diagnostics/tests/callableReference/bound/dataFlow.kt
T
2016-06-07 12:43:07 +03:00

14 lines
273 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_VARIABLE
import kotlin.reflect.KClass
fun f1(x: String?): String {
x!!::hashCode
return <!DEBUG_INFO_SMARTCAST!>x<!>
}
fun f2(y: String?): String {
val f: KClass<*> = (y ?: return "")::class
return <!DEBUG_INFO_SMARTCAST!>y<!>
}