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