Extract Function: Generate function in property's enclosing declaration if original expression belongs to initializer of that property
#KT-6290 Fixed
This commit is contained in:
+8
-4
@@ -1,7 +1,11 @@
|
||||
// PARAM_TYPES: kotlin.Int
|
||||
// PARAM_TYPES: kotlin.Int
|
||||
// PARAM_DESCRIPTOR: value-parameter val a: kotlin.Int defined in bar
|
||||
// PARAM_DESCRIPTOR: value-parameter val b: kotlin.Int defined in bar
|
||||
fun bar(a: Int, b: Int) {
|
||||
fun i(): Int {
|
||||
return a + b
|
||||
}
|
||||
val foo = i(a, b) - 1
|
||||
}
|
||||
|
||||
val foo = i() - 1
|
||||
private fun i(a: Int, b: Int): Int {
|
||||
return a + b
|
||||
}
|
||||
Reference in New Issue
Block a user