Simple workaround for problem described in KT-6437

JS backend generate invalid code when inlining within constructor using property
This commit is contained in:
Denis Zharkov
2014-12-11 12:04:40 +03:00
committed by Alexander Udalov
parent c6d6aebd2f
commit 34d408eb7b
@@ -16,7 +16,10 @@ class Field(
// if init(i, j) is true, the cell (i, j) is alive
init: (Int, Int) -> Boolean
) {
private val live: Array<Array<Boolean>> = Array(height) { i -> Array(width) { j -> init(i, j) } }
private val live: Array<Array<Boolean>>
{
live = Array(height) { i -> Array(width) { j -> init(i, j) } }
}
private fun liveCount(i: Int, j: Int)
= if (i in 0..height - 1 &&