Files
kotlin-fork/idea/testData/refactoring/introduceVariable/callUnderSmartCast.kt
T
2015-03-13 23:16:59 +03:00

11 lines
150 B
Kotlin

trait T {
fun foo(): Int
}
trait U: T
fun test(t: T): Int {
return if (t is U)
<selection>t.foo()</selection> + 1
else t.foo()
}