Files
kotlin-fork/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionIdentifier.kt
T
2015-04-29 16:33:24 +02:00

14 lines
321 B
Kotlin

// !CHECK_TYPE
fun foo(a: Number): Int {
val result = (a as Int) compareTo <!DEBUG_INFO_SMARTCAST!>a<!>
checkSubtype<Int>(<!DEBUG_INFO_SMARTCAST!>a<!>)
return result
}
fun bar(a: Number): Int {
val result = 42 compareTo (a as Int)
checkSubtype<Int>(<!DEBUG_INFO_SMARTCAST!>a<!>)
return result
}