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)
15 lines
366 B
Kotlin
Vendored
15 lines
366 B
Kotlin
Vendored
// !USE_EXPERIMENTAL: kotlin.js.ExperimentalJsExport
|
|
// !RENDER_DIAGNOSTICS_MESSAGES
|
|
|
|
package foo
|
|
|
|
@JsExport
|
|
class C(val x: String) {
|
|
<!WRONG_EXPORTED_DECLARATION("secondary constructor without @JsName")!>constructor(x: Int)<!>: this(x.toString())
|
|
}
|
|
|
|
@JsExport
|
|
class C2(val x: String) {
|
|
@JsName("JsNameProvided")
|
|
constructor(x: Int): this(x.toString())
|
|
} |