From b1465fbfb8581b2d410cabc820df989cb6ac2f6e Mon Sep 17 00:00:00 2001 From: Alexander Korepanov Date: Mon, 20 Nov 2023 14:09:29 +0100 Subject: [PATCH] [JS FIR] Enable warnings and infos for JS FIR tests --- .../dynamicTypes/dynamicCastTarget.fir.kt | 28 +++++++-------- .../dynamicTypes/dynamicExtension.fir.kt | 2 +- .../dynamicTypes/dynamicExtension.kt | 4 +-- .../export/genericClassWithInner.kt | 14 ++++++++ .../export/genericClassWithInner.txt | 22 ++++++++++++ .../export/nonConsumableIdentifiers.fir.kt | 22 ++++++------ ...ConsumableIdentifiersInExportedFile.fir.kt | 12 +++---- .../unexportableTypesInSignature.fir.kt | 28 +++++++-------- .../unexportableTypesInTypeParameters.fir.kt | 10 +++--- .../testsWithJsStdLib/name/classMembers.kt | 1 + .../inlineClassAsParameterOrReturnType.kt.kt | 3 +- ...ClassAsParameterOrReturnType_allowed.kt.kt | 4 +-- .../native/inlineExtensionToNative.kt | 1 + .../exportedNamesClash/functionAndFunction.kt | 1 + .../exportedNamesClash/functionAndProperty.kt | 1 + .../exportedNamesClash/multipleClash.diag.txt | 34 +++++++++---------- .../exportedNamesClash/multipleClash.kt | 1 + .../exportedNamesClash/packageAndFunction.kt | 1 + .../exportedNamesClash/packageAndProperty.kt | 1 + .../exportedNamesClash/propertyAndProperty.kt | 1 + .../fir/AbstractFirPsiJsDiagnosticTest.kt | 1 - ...JsOldFrontendDiagnosticsTestGenerated.java | 6 ++++ .../DiagnosticsWithJsStdLibTestGenerated.java | 6 ++++ 23 files changed, 130 insertions(+), 74 deletions(-) create mode 100644 compiler/testData/diagnostics/testsWithJsStdLib/export/genericClassWithInner.kt create mode 100644 compiler/testData/diagnostics/testsWithJsStdLib/export/genericClassWithInner.txt diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/dynamicCastTarget.fir.kt b/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/dynamicCastTarget.fir.kt index ac950599641..0a7e7cf58b4 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/dynamicCastTarget.fir.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/dynamicCastTarget.fir.kt @@ -1,29 +1,29 @@ // !DIAGNOSTICS: -REDUNDANT_NULLABLE fun test(d: Any, dl: Collection) { - d as dynamic - d as dynamic? + d as dynamic + d as dynamic? - d as? dynamic - d as? dynamic? + d as? dynamic + d as? dynamic? - d is dynamic - d is dynamic? + d is dynamic + d is dynamic? - d !is dynamic - d !is dynamic? + d !is dynamic + d !is dynamic? when (d) { - is dynamic -> {} - is dynamic? -> {} - !is dynamic -> {} - !is dynamic? -> {} + is dynamic -> {} + is dynamic? -> {} + !is dynamic -> {} + !is dynamic? -> {} } dl as List - dl is List + dl is List when (dl) { - is List -> {} + is List -> {} } } diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/dynamicExtension.fir.kt b/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/dynamicExtension.fir.kt index 38fba4f4fc3..6b30ca46bfa 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/dynamicExtension.fir.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/dynamicExtension.fir.kt @@ -1,5 +1,5 @@ // !MARK_DYNAMIC_CALLS - +// !DIAGNOSTICS: -ERROR_SUPPRESSION @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") @kotlin.internal.DynamicExtension fun dynamic.onDynamicFun() = 1 diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/dynamicExtension.kt b/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/dynamicExtension.kt index d9e1095151f..fdb1cc56046 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/dynamicExtension.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/dynamicExtension.kt @@ -1,5 +1,5 @@ // !MARK_DYNAMIC_CALLS - +// !DIAGNOSTICS: -ERROR_SUPPRESSION @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") @kotlin.internal.DynamicExtension fun dynamic.onDynamicFun() = 1 @@ -25,4 +25,4 @@ fun test(d: dynamic, a: Any?) { a.onDynamicProperty } -fun eatT(t: T) {} \ No newline at end of file +fun eatT(t: T) {} diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/export/genericClassWithInner.kt b/compiler/testData/diagnostics/testsWithJsStdLib/export/genericClassWithInner.kt new file mode 100644 index 00000000000..401204fdfbd --- /dev/null +++ b/compiler/testData/diagnostics/testsWithJsStdLib/export/genericClassWithInner.kt @@ -0,0 +1,14 @@ +// FIR_IDENTICAL +// !OPT_IN: kotlin.js.ExperimentalJsExport +// !RENDER_DIAGNOSTICS_MESSAGES +import kotlin.js.JsExport + +@JsExport +class ClassA { + inner class InnerA { + + } +} + +@JsExport +interface UpperBoundInterface {} diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/export/genericClassWithInner.txt b/compiler/testData/diagnostics/testsWithJsStdLib/export/genericClassWithInner.txt new file mode 100644 index 00000000000..4239a91dc6e --- /dev/null +++ b/compiler/testData/diagnostics/testsWithJsStdLib/export/genericClassWithInner.txt @@ -0,0 +1,22 @@ +package + +@kotlin.js.JsExport public final class ClassA { + public constructor ClassA() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String + + public final inner class InnerA /*captured type parameters: /*0*/ T : UpperBoundInterface*/ { + public constructor InnerA() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String + } +} + +@kotlin.js.JsExport public interface UpperBoundInterface { + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/export/nonConsumableIdentifiers.fir.kt b/compiler/testData/diagnostics/testsWithJsStdLib/export/nonConsumableIdentifiers.fir.kt index 1cf505c7f60..5ac731cc866 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/export/nonConsumableIdentifiers.fir.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/export/nonConsumableIdentifiers.fir.kt @@ -3,25 +3,25 @@ package foo -@JsExport -fun delete() {} +@JsExport +fun delete() {} + +@JsExport +val instanceof = 4 + +@JsExport +class eval @JsExport -val instanceof = 4 - -@JsExport -class eval - -@JsExport -@JsName("await") +@JsName("await") fun foo() {} @JsExport -@JsName("this") +@JsName("this") val bar = 4 @JsExport -@JsName("super") +@JsName("super") class Baz @JsExport diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/export/nonConsumableIdentifiersInExportedFile.fir.kt b/compiler/testData/diagnostics/testsWithJsStdLib/export/nonConsumableIdentifiersInExportedFile.fir.kt index 9516ab98d14..09e0573c0c6 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/export/nonConsumableIdentifiersInExportedFile.fir.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/export/nonConsumableIdentifiersInExportedFile.fir.kt @@ -4,19 +4,19 @@ package foo -fun delete() {} +fun delete() {} -val instanceof = 4 +val instanceof = 4 -class eval +class eval -@JsName("await") +@JsName("await") fun foo() {} -@JsName("this") +@JsName("this") val bar = 4 -@JsName("super") +@JsName("super") class Baz class Test { diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/export/unexportableTypesInSignature.fir.kt b/compiler/testData/diagnostics/testsWithJsStdLib/export/unexportableTypesInSignature.fir.kt index fc2befe0616..79089129cbf 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/export/unexportableTypesInSignature.fir.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/export/unexportableTypesInSignature.fir.kt @@ -7,30 +7,30 @@ package foo class C @JsExport -fun foo(x: C) { +fun foo(x: C) { } -@JsExport -fun bar() = C() +@JsExport +fun bar() = C() -@JsExport -val x: C = C() +@JsExport +val x: C = C() -@JsExport -var x2: C +@JsExport +var x2: C get() = C() set(value) { } @JsExport class A( - val x: C, - y: C + val x: C, + y: C ) { - fun foo(x: C) = x + fun foo(x: C) = x - val x2: C = C() + val x2: C = C() - var x3: C + var x3: C get() = C() set(value) { } } @@ -40,7 +40,7 @@ fun foo2() { } @JsExport -fun foo3(x: Unit) { +fun foo3(x: Unit) { } @JsExport @@ -48,7 +48,7 @@ fun foo4(x: () -> Unit) { } @JsExport -fun foo5(x: (Unit) -> Unit) { +fun foo5(")!>x: (Unit) -> Unit) { } @JsExport diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/export/unexportableTypesInTypeParameters.fir.kt b/compiler/testData/diagnostics/testsWithJsStdLib/export/unexportableTypesInTypeParameters.fir.kt index b4890754f11..55d44dd559a 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/export/unexportableTypesInTypeParameters.fir.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/export/unexportableTypesInTypeParameters.fir.kt @@ -8,17 +8,17 @@ abstract class C interface I @JsExport -fun foo() { } +fun C>foo() { } @JsExport -class A +class AC, S: I> @JsExport -interface I2 where T : C, T : I +interface I2 where T : C, T : I @JsExport -class B(val a: T, val b: Comparable) { - val c: Comparable = b +class B(val a: T, ")!>val b: Comparable) { + ")!>val c: Comparable = b } @JsExport diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/name/classMembers.kt b/compiler/testData/diagnostics/testsWithJsStdLib/name/classMembers.kt index bec3457f41c..537cc1055d4 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/name/classMembers.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/name/classMembers.kt @@ -1,4 +1,5 @@ // FIR_IDENTICAL +// !DIAGNOSTICS: -ERROR_SUPPRESSION @file:Suppress("UNUSED_PARAMETER", "CONFLICTING_OVERLOADS", "REDECLARATION") class A1 { diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/inlineClassAsParameterOrReturnType.kt.kt b/compiler/testData/diagnostics/testsWithJsStdLib/native/inlineClassAsParameterOrReturnType.kt.kt index 1ce3eb7cb2c..13e826bcb79 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/inlineClassAsParameterOrReturnType.kt.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/inlineClassAsParameterOrReturnType.kt.kt @@ -1,5 +1,6 @@ // FIR_IDENTICAL // !LANGUAGE: +InlineClasses, -JvmInlineValueClasses, -JsAllowValueClassesInExternals +// !DIAGNOSTICS: -OPT_IN_USAGE // FILE: uint.kt @@ -62,4 +63,4 @@ external interface EI { fun foo(): SomeIC fun foo(c: SomeIC): SomeIC fun foo(a: Int, c: SomeIC): SomeIC -} \ No newline at end of file +} diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/inlineClassAsParameterOrReturnType_allowed.kt.kt b/compiler/testData/diagnostics/testsWithJsStdLib/native/inlineClassAsParameterOrReturnType_allowed.kt.kt index 4650d8173eb..03f206c61ee 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/inlineClassAsParameterOrReturnType_allowed.kt.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/inlineClassAsParameterOrReturnType_allowed.kt.kt @@ -1,6 +1,6 @@ // FIR_IDENTICAL // !LANGUAGE: +InlineClasses, -JvmInlineValueClasses, +JsAllowValueClassesInExternals -// !DIAGNOSTICS: +INLINE_CLASS_IN_EXTERNAL_DECLARATION_WARNING +// !DIAGNOSTICS: +INLINE_CLASS_IN_EXTERNAL_DECLARATION_WARNING -OPT_IN_USAGE // FILE: uint.kt @@ -63,4 +63,4 @@ external interface EI { fun foo(): SomeIC fun foo(c: SomeIC): SomeIC fun foo(a: Int, c: SomeIC): SomeIC -} \ No newline at end of file +} diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/inlineExtensionToNative.kt b/compiler/testData/diagnostics/testsWithJsStdLib/native/inlineExtensionToNative.kt index 1a0f3803192..9e471852a7b 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/inlineExtensionToNative.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/inlineExtensionToNative.kt @@ -1,4 +1,5 @@ // FIR_IDENTICAL +// !DIAGNOSTICS: -NOTHING_TO_INLINE external class A { class B } diff --git a/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/exportedNamesClash/functionAndFunction.kt b/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/exportedNamesClash/functionAndFunction.kt index 700d98eac5e..1842cf13faa 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/exportedNamesClash/functionAndFunction.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/exportedNamesClash/functionAndFunction.kt @@ -1,4 +1,5 @@ // FIR_IDENTICAL +// !DIAGNOSTICS: -ERROR_SUPPRESSION // FILE: A.kt @file:Suppress("OPT_IN_USAGE", "JS_NAME_CLASH") package foo diff --git a/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/exportedNamesClash/functionAndProperty.kt b/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/exportedNamesClash/functionAndProperty.kt index 700d98eac5e..1842cf13faa 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/exportedNamesClash/functionAndProperty.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/exportedNamesClash/functionAndProperty.kt @@ -1,4 +1,5 @@ // FIR_IDENTICAL +// !DIAGNOSTICS: -ERROR_SUPPRESSION // FILE: A.kt @file:Suppress("OPT_IN_USAGE", "JS_NAME_CLASH") package foo diff --git a/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/exportedNamesClash/multipleClash.diag.txt b/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/exportedNamesClash/multipleClash.diag.txt index 1d528e462fa..f443f86cc8c 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/exportedNamesClash/multipleClash.diag.txt +++ b/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/exportedNamesClash/multipleClash.diag.txt @@ -1,25 +1,25 @@ -/Function1.kt:7:1: warning: Exporting name 'test' in ES modules may clash with +/Function1.kt:8:1: warning: Exporting name 'test' in ES modules may clash with exporting name 'test' from file '/Class1.kt' exporting name 'test' from file '/Property1.kt' -/Function1.kt:7:1: error: Exporting name 'test' clashes with +/Function1.kt:8:1: error: Exporting name 'test' clashes with exporting name 'test' from file '/Class1.kt' package 'foo.bar.baz.test' from file '/Package1.kt' package 'foo.bar.baz.test' from file '/Package2.kt' exporting name 'test' from file '/Property1.kt' -/Function2.kt:13:1: error: Exporting name 'baz' clashes with +/Function2.kt:14:1: error: Exporting name 'baz' clashes with package 'foo.bar.baz' from file '/Class1.kt' package 'foo.bar.baz' from file '/Function1.kt' package 'foo.bar.baz' from file '/Package1.kt' package 'foo.bar.baz' from file '/Package2.kt' package 'foo.bar.baz' from file '/Property1.kt' -/Function3.kt:18:1: warning: Exporting name 'foo' in ES modules may clash with +/Function3.kt:19:1: warning: Exporting name 'foo' in ES modules may clash with exporting name 'foo' from file '/Class3.kt' exporting name 'foo' from file '/Property3.kt' -/Function3.kt:18:1: error: Exporting name 'foo' clashes with +/Function3.kt:19:1: error: Exporting name 'foo' clashes with package 'foo' from file '/Class1.kt' package 'foo' from file '/Class2.kt' exporting name 'foo' from file '/Class3.kt' @@ -31,19 +31,19 @@ package 'foo' from file '/Property2.kt' exporting name 'foo' from file '/Property3.kt' -/Property1.kt:24:1: warning: Exporting name 'test' in ES modules may clash with +/Property1.kt:25:1: warning: Exporting name 'test' in ES modules may clash with exporting name 'test' from file '/Class1.kt' exporting name 'test' from file '/Function1.kt' -/Property1.kt:24:1: error: Exporting name 'test' clashes with +/Property1.kt:25:1: error: Exporting name 'test' clashes with exporting name 'test' from file '/Class1.kt' exporting name 'test' from file '/Function1.kt' package 'foo.bar.baz.test' from file '/Package1.kt' package 'foo.bar.baz.test' from file '/Package2.kt' -/Property2.kt:30:1: warning: Exporting name 'bar' in ES modules may clash with exporting name 'bar' from file '/Class2.kt' +/Property2.kt:31:1: warning: Exporting name 'bar' in ES modules may clash with exporting name 'bar' from file '/Class2.kt' -/Property2.kt:30:1: error: Exporting name 'bar' clashes with +/Property2.kt:31:1: error: Exporting name 'bar' clashes with package 'foo.bar' from file '/Class1.kt' exporting name 'bar' from file '/Class2.kt' package 'foo.bar' from file '/Function1.kt' @@ -52,11 +52,11 @@ package 'foo.bar' from file '/Package2.kt' package 'foo.bar' from file '/Property1.kt' -/Property3.kt:35:1: warning: Exporting name 'foo' in ES modules may clash with +/Property3.kt:36:1: warning: Exporting name 'foo' in ES modules may clash with exporting name 'foo' from file '/Class3.kt' exporting name 'foo' from file '/Function3.kt' -/Property3.kt:35:1: error: Exporting name 'foo' clashes with +/Property3.kt:36:1: error: Exporting name 'foo' clashes with package 'foo' from file '/Class1.kt' package 'foo' from file '/Class2.kt' exporting name 'foo' from file '/Class3.kt' @@ -68,19 +68,19 @@ package 'foo' from file '/Property1.kt' package 'foo' from file '/Property2.kt' -/Class1.kt:41:1: warning: Exporting name 'test' in ES modules may clash with +/Class1.kt:42:1: warning: Exporting name 'test' in ES modules may clash with exporting name 'test' from file '/Function1.kt' exporting name 'test' from file '/Property1.kt' -/Class1.kt:41:1: error: Exporting name 'test' clashes with +/Class1.kt:42:1: error: Exporting name 'test' clashes with exporting name 'test' from file '/Function1.kt' package 'foo.bar.baz.test' from file '/Package1.kt' package 'foo.bar.baz.test' from file '/Package2.kt' exporting name 'test' from file '/Property1.kt' -/Class2.kt:47:1: warning: Exporting name 'bar' in ES modules may clash with exporting name 'bar' from file '/Property2.kt' +/Class2.kt:48:1: warning: Exporting name 'bar' in ES modules may clash with exporting name 'bar' from file '/Property2.kt' -/Class2.kt:47:1: error: Exporting name 'bar' clashes with +/Class2.kt:48:1: error: Exporting name 'bar' clashes with package 'foo.bar' from file '/Class1.kt' package 'foo.bar' from file '/Function1.kt' package 'foo.bar' from file '/Function2.kt' @@ -89,11 +89,11 @@ package 'foo.bar' from file '/Property1.kt' exporting name 'bar' from file '/Property2.kt' -/Class3.kt:51:1: warning: Exporting name 'foo' in ES modules may clash with +/Class3.kt:52:1: warning: Exporting name 'foo' in ES modules may clash with exporting name 'foo' from file '/Function3.kt' exporting name 'foo' from file '/Property3.kt' -/Class3.kt:51:1: error: Exporting name 'foo' clashes with +/Class3.kt:52:1: error: Exporting name 'foo' clashes with package 'foo' from file '/Class1.kt' package 'foo' from file '/Class2.kt' package 'foo' from file '/Function1.kt' diff --git a/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/exportedNamesClash/multipleClash.kt b/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/exportedNamesClash/multipleClash.kt index a223ed9b3f9..39d27039ca2 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/exportedNamesClash/multipleClash.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/exportedNamesClash/multipleClash.kt @@ -1,4 +1,5 @@ // FIR_IDENTICAL +// !DIAGNOSTICS: -ERROR_SUPPRESSION // !RENDER_ALL_DIAGNOSTICS_FULL_TEXT // FILE: Function1.kt @file:Suppress("OPT_IN_USAGE", "JS_NAME_CLASH") diff --git a/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/exportedNamesClash/packageAndFunction.kt b/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/exportedNamesClash/packageAndFunction.kt index 5b5654a53c3..126bc2d218a 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/exportedNamesClash/packageAndFunction.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/exportedNamesClash/packageAndFunction.kt @@ -1,4 +1,5 @@ // FIR_IDENTICAL +// !DIAGNOSTICS: -ERROR_SUPPRESSION // FILE: A.kt @file:Suppress("OPT_IN_USAGE", "JS_NAME_CLASH") package foo.bar diff --git a/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/exportedNamesClash/packageAndProperty.kt b/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/exportedNamesClash/packageAndProperty.kt index 91e4971d20b..470d0636204 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/exportedNamesClash/packageAndProperty.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/exportedNamesClash/packageAndProperty.kt @@ -1,4 +1,5 @@ // FIR_IDENTICAL +// !DIAGNOSTICS: -ERROR_SUPPRESSION // FILE: A.kt @file:Suppress("OPT_IN_USAGE", "JS_NAME_CLASH") package foo.bar diff --git a/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/exportedNamesClash/propertyAndProperty.kt b/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/exportedNamesClash/propertyAndProperty.kt index f42be6bab9f..6cbe47e8f51 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/exportedNamesClash/propertyAndProperty.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/exportedNamesClash/propertyAndProperty.kt @@ -1,4 +1,5 @@ // FIR_IDENTICAL +// !DIAGNOSTICS: -ERROR_SUPPRESSION // FILE: A.kt @file:Suppress("OPT_IN_USAGE", "JS_NAME_CLASH") package foo diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/fir/AbstractFirPsiJsDiagnosticTest.kt b/js/js.tests/test/org/jetbrains/kotlin/js/test/fir/AbstractFirPsiJsDiagnosticTest.kt index e8ce717d98c..8a64be264df 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/fir/AbstractFirPsiJsDiagnosticTest.kt +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/fir/AbstractFirPsiJsDiagnosticTest.kt @@ -43,7 +43,6 @@ abstract class AbstractFirJsDiagnosticTestBase(val parser: FirParser) : Abstract defaultDirectives { +ConfigurationDirectives.WITH_STDLIB - DiagnosticsDirectives.DIAGNOSTICS with listOf("-warnings", "-infos") } configureFirParser(parser) diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirPsiJsOldFrontendDiagnosticsTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirPsiJsOldFrontendDiagnosticsTestGenerated.java index 9f6f98092e6..009d87b1762 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirPsiJsOldFrontendDiagnosticsTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirPsiJsOldFrontendDiagnosticsTestGenerated.java @@ -462,6 +462,12 @@ public class FirPsiJsOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiJ runTest("compiler/testData/diagnostics/testsWithJsStdLib/export/extendingNonExportedType.kt"); } + @Test + @TestMetadata("genericClassWithInner.kt") + public void testGenericClassWithInner() throws Exception { + runTest("compiler/testData/diagnostics/testsWithJsStdLib/export/genericClassWithInner.kt"); + } + @Test @TestMetadata("jsExportOnNestedDeclarations.kt") public void testJsExportOnNestedDeclarations() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/DiagnosticsWithJsStdLibTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/DiagnosticsWithJsStdLibTestGenerated.java index 757b51a297f..9918a50bd78 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/DiagnosticsWithJsStdLibTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/DiagnosticsWithJsStdLibTestGenerated.java @@ -462,6 +462,12 @@ public class DiagnosticsWithJsStdLibTestGenerated extends AbstractDiagnosticsTes runTest("compiler/testData/diagnostics/testsWithJsStdLib/export/extendingNonExportedType.kt"); } + @Test + @TestMetadata("genericClassWithInner.kt") + public void testGenericClassWithInner() throws Exception { + runTest("compiler/testData/diagnostics/testsWithJsStdLib/export/genericClassWithInner.kt"); + } + @Test @TestMetadata("jsExportOnNestedDeclarations.kt") public void testJsExportOnNestedDeclarations() throws Exception {