Files
kotlin-fork/js/js.translator/testData/box/native/classObject.kt
T
Alexey Andreev 3b3fd0fa0d JS: fix DCE limits in test data to fit new kotlin.js size
The size has increased due to new implementation of KClass
2017-10-06 18:16:51 +03:00

20 lines
332 B
Kotlin
Vendored

// EXPECTED_REACHABLE_NODES: 1111
package foo
external class A(c: Int) {
val c: Int
companion object {
val g: Int
val c: String = definedExternally
}
}
fun box(): String {
if (A.g != 3) return "fail1"
if (A.c != "hoooray") return "fail2"
if (A(2).c != 2) return "fail3"
return "OK"
}