Extraction Engine: When extracting to enum class body, place new declaration after the last entry

#KT-9629 Fixed
This commit is contained in:
Alexey Sedunov
2015-10-20 19:09:27 +03:00
committed by Alexey Sedunov
parent 40f2a983cc
commit 3fd6864461
7 changed files with 67 additions and 11 deletions
@@ -0,0 +1,10 @@
// PARAM_DESCRIPTOR: value-parameter val n: kotlin.Int defined in E.A.foo
// PARAM_TYPES: kotlin.Int
enum class E {
// SIBLING:
A {
fun foo(n: Int) = <selection>n + 1</selection>
},
B,
C
}
@@ -0,0 +1,12 @@
// PARAM_DESCRIPTOR: value-parameter val n: kotlin.Int defined in E.A.foo
// PARAM_TYPES: kotlin.Int
enum class E {
// SIBLING:
A {
fun foo(n: Int) = i(n)
},
B,
C;
fun i(n: Int) = n + 1
}