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

20 lines
391 B
Kotlin
Vendored

// IGNORE_BACKEND: JS_IR
// EXPECTED_REACHABLE_NODES: 1290
package foo
object A {
@JsName("js_method") fun f() = "method"
@JsName("js_property") val f: String get() = "property"
}
fun test() = js("""
var a = JS_TESTS.foo.A;
return a.js_method() + ";" + a.js_property;
""")
fun box(): String {
val result = test()
assertEquals("method;property", result);
return "OK"
}