Introduce Variable: Convert property accessor body to block when needed

This commit is contained in:
Alexey Sedunov
2014-12-22 19:22:06 +03:00
parent 05a0481efa
commit 82579f489b
6 changed files with 40 additions and 8 deletions
@@ -0,0 +1,8 @@
val a = 2
val x: Int get() =
if (a > 1) {
(<selection>a + 1</selection>) * (a - 1)
} else {
a * (a + 1)
}