Introduce Property: Duplicate search & replace

This commit is contained in:
Alexey Sedunov
2015-03-02 18:03:41 +03:00
parent b78ed32a07
commit 6ae989e330
7 changed files with 61 additions and 2 deletions
@@ -0,0 +1,9 @@
// EXTRACTION_TARGET: property with initializer
class A(val n: Int) {
fun foo(k: Int) {
val a = <selection>n + 1</selection>
val b = n + 1 - 2
val c = foo(n + 1)
}
}
@@ -0,0 +1,11 @@
// EXTRACTION_TARGET: property with initializer
class A(val n: Int) {
fun foo(k: Int) {
val a = i
val b = i - 2
val c = foo(i)
}
private val i = n + 1
}