Files
kotlin-fork/js/js.translator/testData/box/propertyAccess/initInstanceProperties.kt
T
2018-09-12 09:49:25 +03:00

18 lines
336 B
Kotlin
Vendored

// EXPECTED_REACHABLE_NODES: 1282
package foo
class Test() {
val a: Int = 100
var b: Int = a
val c: Int = a + b
}
fun box(): String {
val test = Test()
if (100 != test.a) return "fail1: ${test.a}"
if (100 != test.b) return "fail2: ${test.b}"
if (200 != test.c) return "fail3: ${test.c}"
return "OK"
}