Introduce Property: Place property before its usages
This commit is contained in:
+5
-5
@@ -1,15 +1,15 @@
|
||||
// EXTRACTION_TARGET: property with getter
|
||||
class A {
|
||||
fun foo(): Int {
|
||||
val b = i
|
||||
val c = b - 1
|
||||
}
|
||||
|
||||
private val i: Int
|
||||
get() {
|
||||
val a = 1 + 2
|
||||
val b = a * 2
|
||||
return b
|
||||
}
|
||||
|
||||
fun foo(): Int {
|
||||
val b = i
|
||||
val c = b - 1
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user