Files
kotlin/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/MultiDeclaration.kt
2015-09-25 19:20:20 +03:00

10 lines
179 B
Kotlin
Vendored

// !CHECK_TYPE
operator fun Int.component1() = "a"
fun foo(a: Number) {
val (x) = a as Int
checkSubtype<Int>(<!DEBUG_INFO_SMARTCAST!>a<!>)
checkSubtype<String>(x)
}