Introduce Variable: Do not insert unused variable references
#KT-7227 Fixed
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
fun a() {
|
||||
val i = 1
|
||||
i
|
||||
i
|
||||
if (true) i
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
class A {
|
||||
fun test() = 1
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val a = A()
|
||||
<selection>a.test()</selection>
|
||||
|
||||
val b = a.test()
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
class A {
|
||||
fun test() = 1
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val a = A()
|
||||
val i = a.test()
|
||||
|
||||
val b = i
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
class A {
|
||||
fun test() = 1
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val a = A()
|
||||
a.test()
|
||||
|
||||
val b = <selection>a.test()</selection>
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
class A {
|
||||
fun test() = 1
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val a = A()
|
||||
val i = a.test()
|
||||
|
||||
val b = i
|
||||
}
|
||||
Reference in New Issue
Block a user