Files
kotlin-fork/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionEqualsConvention.kt
T
2015-05-12 19:43:17 +02:00

17 lines
312 B
Kotlin
Vendored

// !CHECK_TYPE
interface A
interface B : A
fun foo1(a: A, b: B): Boolean {
val result = (a as B) == b
checkSubtype<B>(<!DEBUG_INFO_SMARTCAST!>a<!>)
return result
}
fun foo2(a: A, b: B): Boolean {
val result = b == (a as B)
checkSubtype<B>(<!DEBUG_INFO_SMARTCAST!>a<!>)
return result
}