Files
kotlin-fork/compiler/testData/diagnostics/testsWithJsStdLib/export/secondaryConstructorWithoutJsName.kt
T
2021-09-10 16:29:16 +03:00

15 lines
356 B
Kotlin
Vendored

// !OPT_IN: 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())
}