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

9 lines
237 B
Kotlin
Vendored

// !CHECK_TYPE
fun foo(x: Number, y: String?): String {
val result = "abcde $x ${x as Int} ${y!!} $x $y"
checkSubtype<Int>(<!DEBUG_INFO_SMARTCAST!>x<!>)
checkSubtype<String>(<!DEBUG_INFO_SMARTCAST!>y<!>)
return result
}