Introduce Parameter: Support conversion of local variables
#KT-9170 Fixed
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
fun foo(): Int {
|
||||
<selection>val x = 1</selection>
|
||||
|
||||
return 1 + x
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
Cannot introduce parameter of type 'Unit'
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
fun foo(i: Int) {
|
||||
val <caret>t = 1
|
||||
val u = t + i
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
fun foo(i: Int, i1: Int = 1) {
|
||||
val u = i1 + i
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
fun foo(i: Int) {
|
||||
<selection>val t = 1</selection>
|
||||
val u = t + i
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
fun foo(i: Int, i1: Int = 1) {
|
||||
val u = i1 + i
|
||||
}
|
||||
Reference in New Issue
Block a user