Add code transformations for if/when in local property initializers

This commit is contained in:
Alexey Sedunov
2013-06-07 15:43:58 +04:00
parent 70b4fb48bc
commit 3f2ff3eb24
43 changed files with 592 additions and 10 deletions
@@ -0,0 +1,6 @@
val res: String
if (ok) {
res = "ok"
} else {
res = "failed"
}
@@ -0,0 +1,5 @@
val res = if (ok) {
"ok"
} else {
"failed"
}
@@ -0,0 +1,5 @@
<html>
<body>
This intention converts property with 'if' initializer to uninitialized property followed by 'if' expression where each branch is terminated with assignment
</body>
</html>