Translate when as if-else instead for loop.

This commit is contained in:
develar
2013-06-21 16:21:28 +04:00
committed by Zalim Bashorov
parent bc043fb964
commit 9cd22942e2
8 changed files with 124 additions and 115 deletions
@@ -0,0 +1,9 @@
package foo
fun box(): Boolean {
var a = 0
when (a) {
else -> a = 2
}
return a == 2
}