6e3d3831c2
Account for JsExport in legacy backend namer. It means we catch overloaded exported function conflicts for free! Add error diagnostics: * NESTED_JS_EXPORT (Fixes KT-36798) * WRONG_EXPORTED_DECLARATION (Part of the fix for KT-37752) * NON_EXPORTABLE_TYPE (Fixes KT-37771)
29 lines
438 B
Kotlin
Vendored
29 lines
438 B
Kotlin
Vendored
// EXPECTED_REACHABLE_NODES: 1282
|
|
|
|
@JsExport
|
|
interface I {
|
|
fun ok(): String
|
|
}
|
|
|
|
inline fun ok(): I {
|
|
return object : I {
|
|
override fun ok() = "OK"
|
|
}
|
|
}
|
|
|
|
@JsName("convolutedOk")
|
|
@JsExport
|
|
inline fun convolutedOk(): I {
|
|
val fail = object : I {
|
|
override fun ok() = "fail"
|
|
}.ok()
|
|
|
|
return ok()
|
|
}
|
|
|
|
fun box(): String {
|
|
val ok = js("_").convolutedOk()
|
|
if (ok !is I) return "fail"
|
|
|
|
return ok.ok()
|
|
} |