Extract Function: Allow to choose between function and property extraction
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
// EXTRACT_AS_PROPERTY
|
||||
|
||||
class A(val n: Int = 1) {
|
||||
val m: Int = 2
|
||||
// SIBLING:
|
||||
fun foo(): Int {
|
||||
return i
|
||||
}
|
||||
|
||||
private val i: Int
|
||||
get() {
|
||||
return m + n + 1
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user