Inline refactoring: fix case with introduction of variable to return

#KT-39818 Fixed
This commit is contained in:
Dmitry Gridin
2020-06-25 17:13:29 +07:00
parent f4e9acb233
commit 45234c9784
7 changed files with 33 additions and 25 deletions
+10
View File
@@ -0,0 +1,10 @@
fun downUnder(): Int = 4
fun downParameter<caret>(p: Int): Int {
"first $p"
"second $p"
p
return p
}
fun callDown() {
val result = downParameter(downUnder())
}
@@ -0,0 +1,8 @@
fun downUnder(): Int = 4
fun callDown() {
val p = downUnder()
"first ${p}"
"second ${p}"
p
val result = p
}