Files
kotlin-fork/js/js.translator/testData/box/jsModule/externalClass.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

18 lines
309 B
Kotlin
Vendored

// EXPECTED_REACHABLE_NODES: 1114
// MODULE_KIND: AMD
package foo
@JsModule("lib")
external class A(x: Int = definedExternally) {
val x: Int
fun foo(y: Int): Int = definedExternally
}
fun box(): String {
val a = A(23)
assertEquals(23, a.x)
assertEquals(65, a.foo(42))
return "OK"
}