Introduce Variable: Use expression unifier to find duplicates
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
fun a(x: Int) {
|
||||
val a = <selection>x + 1</selection>
|
||||
"it's a number ${x + 1}"
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
fun a(x: Int) {
|
||||
val i = x + 1
|
||||
val a = i
|
||||
"it's a number ${i}"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fun a() {
|
||||
val x = <selection>Foo()</selection>
|
||||
println(Foo())
|
||||
println(Foo)
|
||||
println(Foo(1))
|
||||
println(1.Foo())
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
fun a() {
|
||||
val foo = Foo()
|
||||
val x = foo
|
||||
println(foo)
|
||||
println(Foo)
|
||||
println(Foo(1))
|
||||
println(1.Foo())
|
||||
}
|
||||
Reference in New Issue
Block a user