[K/JS] Generate unstable names on Frontend-checks for declarations with the JsExport.Ignore annotation ^KT-60202 Fixed

This commit is contained in:
Artem Kobzar
2023-07-24 09:52:58 +00:00
committed by Space Team
parent 8ce1417621
commit 53aa8eddfe
5 changed files with 71 additions and 0 deletions
@@ -128,6 +128,12 @@ public final class AnnotationsUtils {
}
if (hasAnnotationOrInsideAnnotatedClass(descriptor, JS_EXPORT_IGNORE)) return false;
if (descriptor instanceof PropertyAccessorDescriptor) {
PropertyAccessorDescriptor propertyAccessor = (PropertyAccessorDescriptor) descriptor;
if (propertyAccessor.getCorrespondingProperty().getAnnotations().hasAnnotation(JS_EXPORT_IGNORE)) return false;
}
if (hasAnnotationOrInsideAnnotatedClass(descriptor, JS_EXPORT)) return true;
if (CollectionsKt.any(getContainingFileAnnotations(bindingContext, descriptor), annotation ->
@@ -515,6 +515,12 @@ public class FirPsiJsOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiJ
public void testWrongExportedDeclarationInExportedFile() throws Exception {
runTest("compiler/testData/diagnostics/testsWithJsStdLib/export/wrongExportedDeclarationInExportedFile.kt");
}
@Test
@TestMetadata("wrongExportedDeclarationInExportedFileWhenIgnored.kt")
public void testWrongExportedDeclarationInExportedFileWhenIgnored() throws Exception {
runTest("compiler/testData/diagnostics/testsWithJsStdLib/export/wrongExportedDeclarationInExportedFileWhenIgnored.kt");
}
}
@Nested