Files
kotlin-fork/compiler/testData/diagnostics/testsWithJsStdLib/export/nonConsumableIdentifiers.kt
T
Artem Kobzar 14e4febb05 [K/JS] Exclude default from the regular reserved keywords to give ability to export declarations with default export ^KT-54480 Fixed
fix(KT-54480): exclude default from the regular reserved keywords to give ability to export intities with default export.

Merge-request: KT-MR-7459
Merged-by: Artem Kobzar <Artem.Kobzar@jetbrains.com>
2022-10-24 10:12:30 +00:00

46 lines
743 B
Kotlin
Vendored

// !OPT_IN: kotlin.js.ExperimentalJsExport
// !RENDER_DIAGNOSTICS_MESSAGES
package foo
@JsExport
fun <!NON_CONSUMABLE_EXPORTED_IDENTIFIER!>delete<!>() {}
@JsExport
val <!NON_CONSUMABLE_EXPORTED_IDENTIFIER!>instanceof<!> = 4
@JsExport
class <!NON_CONSUMABLE_EXPORTED_IDENTIFIER!>eval<!>
@JsExport
@JsName(<!NON_CONSUMABLE_EXPORTED_IDENTIFIER!>"await"<!>)
fun foo() {}
@JsExport
@JsName(<!NON_CONSUMABLE_EXPORTED_IDENTIFIER!>"this"<!>)
val bar = 4
@JsExport
@JsName(<!NON_CONSUMABLE_EXPORTED_IDENTIFIER!>"super"<!>)
class Baz
@JsExport
@JsName("default")
class DefDef
@JsExport
class Test {
fun instanceof() {}
@JsName("eval")
fun test() {}
}
@JsExport
object NaN
@JsExport
enum class Nums {
Infinity,
undefined
}