[JS IR] Fix JS code diagnostics tests according to new KLIB checks

^KT-62425
This commit is contained in:
Alexander Korepanov
2023-10-12 14:03:14 +02:00
committed by Space Team
parent 04809a6b3b
commit 261527939b
12 changed files with 110 additions and 50 deletions
@@ -1,10 +1,15 @@
// 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.
// ERROR_POLICY: SEMANTIC
fun main(): Unit {
js("var a = 08;")
js(<!JSCODE_WARNING!>"var a = 08;"<!>)
js("""var a =
js(<!JSCODE_WARNING!>"""var a =
08;""")
08;"""<!>)
val code = "var a = 08;"
js(code)
js(<!JSCODE_ARGUMENT_NON_CONST_EXPRESSION, JSCODE_CAN_NOT_VERIFY_JAVASCRIPT!>code<!>)
}