Files
kotlin-fork/js/js.translator/testData/box/jsName/avoidNameClash.kt
T
Svyatoslav Kuzmich 4a803e9d2f [JS IR] Support object declaration export
Fixes KT-39117 and KT-39367
2020-07-23 08:21:59 +03:00

19 lines
368 B
Kotlin
Vendored

// EXPECTED_REACHABLE_NODES: 1290
@JsExport
object A {
@JsName("js_method") fun f() = "method"
@JsName("js_property") val f: String get() = "property"
}
fun test(): dynamic {
val a = A.asDynamic()
return a.js_method() + ";" + a.js_property
}
fun box(): String {
val result = test()
assertEquals("method;property", result);
return "OK"
}