Create from Usage: Support smart casts on explicit receivers

#KT-24069 Fixed
This commit is contained in:
Alexey Sedunov
2018-05-10 19:16:58 +03:00
parent a92a4a2a6d
commit a5a13b74f5
5 changed files with 43 additions and 4 deletions
@@ -0,0 +1,10 @@
// "Create member function 'SomeObj.doSomething'" "true"
class SomeObj { }
fun doSomething(p: Any): List<Number>{
if (p is SomeObj){
p.<caret>doSomething()
}
return emptyList()
}
@@ -0,0 +1,14 @@
// "Create member function 'SomeObj.doSomething'" "true"
class SomeObj {
fun doSomething() {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
fun doSomething(p: Any): List<Number>{
if (p is SomeObj){
p.doSomething()
}
return emptyList()
}