Fix MoveProperty intention: better property placement

Property is placed now before first property, or at the beginning of class body if no properties found.

#KT-18044 Fixed
This commit is contained in:
Vyacheslav Gerasimov
2017-05-29 14:15:39 +03:00
parent ca124d1e36
commit 24476fc581
6 changed files with 48 additions and 1 deletions
@@ -0,0 +1,8 @@
class TestClass(val <caret>text: String) {
fun foo() {
}
val p1 = 0
}
@@ -0,0 +1,9 @@
class TestClass(text: String) {
fun foo() {
}
val text = text
val p1 = 0
}
@@ -0,0 +1,8 @@
class TestClass(val <caret>text: String) {
val p1 = 0
fun foo() {
}
}
@@ -0,0 +1,9 @@
class TestClass(text: String) {
val text = text
val p1 = 0
fun foo() {
}
}