blob: 530befa6bbda878b93f8a391506b1e0f315c9124 [file]
// LANGUAGE: -IrIntraModuleInlinerBeforeKlibSerialization -IrCrossModuleInlinerBeforeKlibSerialization
// RUN_PIPELINE_TILL: BACKEND
// FIR_DIFFERENCE
// The diagnostic cannot be implemented with the FIR frontend checker because it requires constant evaluation over FIR.
// The diagnostic is implemented as a klib check over IR.
// IGNORE_BACKEND_K1: JS_IR
// DIAGNOSTICS: -UNUSED_PARAMETER
fun foo(x: Any) {
js("delete x.foo;")
js("delete x['bar'];")
js(<!JSCODE_ERROR!>"delete x.baz();"<!>)
js(<!JSCODE_ERROR!>"delete this;"<!>)
}