Files
kotlin-fork/idea/testData/quickfix/changeSignature/addFunctionParameterWithSmartCast.kt
T
Alexey Sedunov a92a4a2a6d Add Parameter Fix: Support smart casts
#KT-24207 Fixed
2018-05-11 16:05:19 +03:00

13 lines
256 B
Kotlin
Vendored

// "Add parameter to function 'fooFun'" "true"
sealed class Foo {
class SubFoo : Foo()
class Sub2Foo : Foo()
}
fun fooFun(): Int = 1
val subFoo: Foo = Foo.SubFoo()
val bar = when(subFoo){
is Foo.SubFoo -> fooFun(<caret>subFoo)
else -> 0
}