[JS IR] Run diagnostics by IR before the klib serialization

Implement an infrastructure for checking IR before JS klib serialization.
Implement the EXPORTING_JS_NAME_CLASH and EXPORTING_JS_NAME_CLASH_ES checks.

^KT-61710 Fixed
This commit is contained in:
Alexander Korepanov
2023-09-07 22:08:22 +02:00
parent 13bd627bfa
commit 522952db1f
24 changed files with 385 additions and 87 deletions
@@ -15,3 +15,6 @@ actual annotation class A
-- JS --
Exit code: OK
Output:
compiler/testData/multiplatform/optionalExpectation/common.kt:5:1: warning: 'expect'/'actual' classes (including interfaces, objects, annotations, enums, and 'actual' typealiases) are in Beta. You can use -Xexpect-actual-classes flag to suppress this warning. Also see: https://youtrack.jetbrains.com/issue/KT-61573
expect annotation class A()
^